The problem I was having was that the killfocus_cb is called before the
getfocus_cb and when killfocus was called none of the elements in the
dialog have focus so it may decide that it does not have focus and hide it.

So currently I am creating a timer and checking every 50ms to see if any of
the components in the dialog has focus. If none of them have it then I hide
it, but I don't like this was too much. If there is another cleaner way
that would be much better.

I really want to create a dialog that behaves like a popup menu. The popup
menu disappears if you click outside it, also it will disappear if the main
application dialog closes. It is not too easy to replicate the same
behavior for a dialog.

On Fri, Dec 26, 2014 at 3:42 PM, Milind Gupta <[email protected]>
wrote:

> Hi,
>        How can I create a dialog which hides itself when it looses focus
> i.e. when the mouse clicks anywhere except the dialog children. If any of
> the dialog's children have focus then it should not be hidden.
>
> Thanks,
> Milind
>
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to