Stan wrote:
>>      Made some small mods to your program so that the windows are
>>      separate, so now when you hit 'tab' you cycle through only "one"
>>      and "two".
> 
> Well, sure.  But what I'm trying to accomplish includes
> 
>>> I want the popup to be anchored to the main window
>>> at a spot of my choosing.

        I don't know about the 'anchored' part, but you can choose where
        the separate calendar window opens up by position()ing it before
        show()ing it.

        As shown in the demo, I'm choosing where the child window opens;
        I'm locking it to the upper right of the parent window, just by
        specifying the x/y position of the window before opening it.

        In your final app, you would likely have a 'calendar open' button
        the user presses, and you can use the Fl::event_x_root() and
        Fl::event_y_root() to get the user's mouse position at the time
        of the event, and position() your calendar window there before
        show()ing it, so that it opens where the user's mouse is.

        The calendar window will still be separate though; it won't
        be 'anchored' to the parent window if it's moved.
        If you want it to track, that might involve some custom code
        on your part to define that behavior.

        Or, you may want to set things up so that if the user moves off
        the calendar window, it hide()s automatically, similar to the
        way a popup menu disappears if you move off of it. In such a case
        you might even want to make the calendar window borderless
        (eg. border(0)) so that there's no window manager decorations
        to confuse the user.

        On the airline sites I visted (cited previously), the calendar
        windows open up as a separate window, with window manager decorations
        intact. Or so is the case on my linux machine with Firefox, anyway.

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to