michael sephton wrote:
>>>> i want the window that the button was on
>>>> to be closed. How do i do this?
>>>
>>>     Tell the first window to hide() itself as part of the button's
>>>     callback.
>>
>> i have tried that but how do i reference the windows pointer, i cant just do 
>> hide();
> 
> You can access a pointer to the window within the button callback
> by setting the second argument of the button callback function as a pointer 
> to the window. [..]

        Right -- that's what the callback's 'user data' is for.

        If you're new to callbacks and user data, this is also described
        in the latter part of the fltk 'hello world' video:
        http://seriss.com/people/erco/fltk-videos/
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to