FLTK logo

Re: de-activate a window

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: de-activate a window imacarthur Nov 30, 2009  
 
On 30 Nov 2009, at 0:50, Jason Cumiskey wrote:

> I am writing an application that contains one main window and when you
> select a specific radio button, I want a new, smaller window to pop-up
> and take user input.  While this is happening, I want the main  
> window to
> be totally de-activated (users can't interact it with it at all). I
> tried calling set_modal() on the new window

Good start...


> and set_non_modal() on the
> main window but it doesn't seem to work.

Ah, no. That's not what to do.

Window modality is tri-state, not bi-state, and "non_modal" is *not*  
the opposite of "modal".

A window can be "normal", or "modal" (stays on top and takes *all*  
user interactions preventing anything from going to the parent -  
probably what you want), or "non-modal" (stays on top but *does not*  
prevent interactions going to the parent, e.g. for toolboxes etc.)

It should be enough to make your child window "modal" and leave the  
parent as "normal" and all should DTRT.

I *think* this is discussed in the docs, actually.
Note that the rather odd naming was "acquired" form the win32 API  
where that convention seems to be used, but it does seem to engender  
a degree of confusion amongst, well, everybody, to be honest!
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.