swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: positioning windows


From: Ginger Booth
Subject: Re: positioning windows
Date: Thu, 21 Mar 96 14:32:52 EST

Dear long-suffering Nelson,

    I know, I'm a pest.  And you've been so generous, too.
    
    But if you're going to provide that access mechanism:

-setWindowPositionX: (int) x Y: (int) y {
    if ((x >= 0) && (y >= 0))
        [globalTkInterp eval: "wm geometry %s %+d%+d",
                  [[self getTopLevel] getWidgetName], x, y];
    else if ((x < 0) && (y >= 0))
        [globalTkInterp eval: "wm geometry %s %d%+d",
                  [[self getTopLevel] getWidgetName], x, y];
    else if ((x >= 0) && (y < 0))
        [globalTkInterp eval: "wm geometry %s %+d%d",
                  [[self getTopLevel] getWidgetName], x, y];
    else
        [globalTkInterp eval: "wm geometry %s %d%d",
                  [[self getTopLevel] getWidgetName], x, y];
              
   return self;
}

Location -0+0 is the upper-right-hand corner.  I can live with -1+0.
Really-ultra-super-generous would be giving some hooks to manipulate those
geometry strings in a useful manner.  
    
> Ask, and ye shall receive. I've added an accessor method to get the
> panel. All the SimControl stuff is in the process of changing now, as
> part of experiment swarm, I think it will be more flexible soon.

Thanks!

Cheers,
    Ginger
    


reply via email to

[Prev in Thread] Current Thread [Next in Thread]