another random idea is to set its width and height to 0. don't know if it'll work for you as it still can focus etc.
( w= GUI.window.new("test", Rect(100, 200, 300, 400)); GUI.slider.new(w, Rect(10, 20, 30, 40)); w.front; Routine({ var b; 2.wait; b= w.bounds; w.bounds= Rect(100, 200, 0, 0); 2.wait; //be gone for 2sec w.bounds= b; }).play(AppClock); )
7 maj 2009 kl. 22.14 skrev Batuhan Bozkurt: Hi James, I've completely disregarded alpha because well, I thought when alpha is 0, the window is still there and thought it would respond to clicks and I'll have code windows floating around, so I thought it would interfere, but trying it now, seems that when alpha is 0 there is this exception that the window does not respond to clicks (i.e. never becomes the front window) so I can access other code windows without the zero alpha window getting on my way (I'm not really sure now if that is reliable though, is this a "feature"?). It is still there in expose etc. (invisible but space is reserved) but I can live with that I guess... If there is a better way of doing it I'm always interested though... Thanks, Batuhan On May 7, 2009, at 8:45 PM, James Harkins wrote: Actually there could be a cross-platform issue here. I think the alpha
trick works on mac, but not SwingOSC. For SwingOSC:
w.visible = false;
w.visible = true;
Not sure if SCWindow supports visible_.
hjh
PS Yes, once you close a window, it's gone. w.close is permanent.
On Thu, May 7, 2009 at 2:40 PM, James Harkins <jamshark70@xxxxxxxxx> wrote:
Set the window's alpha to 0? Then back to 1 when you need it again.
hjh
On Thu, May 7, 2009 at 3:39 PM, Batuhan Bozkurt
<batuhan@xxxxxxxxxxxxxxxxxx> wrote:
Hi all,
Stuck on something very fundamental, I can't really see how I haven't needed
this before but, how should I go for hiding a window to be able to reopen
it later on without creating a new Window, with its state intact (i.e.
without reinitializing the window and widgets, the ones which I use now are
actually subclasses of the standard widgets and they have their own private
states)? I know this is also a question of design, but for now, I'd be
really happy if I could just close a window (or hide it) and reopen it as if
it was always there, just by rendering it invisible then visible... I've
ditched the docs and the archives but couldn't find a mention of it at all.
Now seems like once I close the window, its gone forever... Any pointers?
#|
fredrikolofsson.com klippav.org musicalfieldsforever.com |#
|