> I am trying to create a little widget/group made of an Fl_Input (or
> text editor) and a drop-down-menu-like suggestions box. The end goal is
> to make something similar to an AJAX-y suggestions box found on google,
> or the firefox sites suggestions, etc.
> 
> It's easy for me to create/fill/show a popup made of an
> Fl_Select_Browser inside an Fl_Menu_Window. If I use an Fl_Menu_Window,
> though, show() steals focus and the mouse cursor from my Fl_Input
> widget. I can't send back focus because the menu is a new window ... or
> at least I haven't figured out how to send it back ... ?
> 
> In short, I have something like the pseudo-code below. I'm happy to
> post my full test/draft if that helps.
> 
> Maybe someone else has been through this before?


Without actually thinking about your problem much (or indeed at all!) my 
initial reaction is that Fl_Menu_Window is the wrong way to go (menu windows 
tend to grab, and that is *not* what you want!)

I think you'd be better off just popping up a "regular" Fl_Double_Window with 
your controls in it, then setting that popup window to "non-modal", which will 
cause it to stay on top of your main window, but *not* grab the focus (though 
it may take the focus when it pops up, it will not grab it, so you should be 
able to give it back to your main window...)

Also, I think setting the popup window non-modal will usually also remove the 
window decorations (may depend on how your window manager behaves though I 
suspect!) so it will look much like a menu window would...




********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to