Showing the Fl_Button object, or hiding it. Is it possible?

25 views
Skip to first unread message

Mich Paw

unread,
May 20, 2017, 12:12:53 PM5/20/17
to fltk.general
Hello.

I'm wondering, is it possible, to hide a button, or other Fl_Widget inherited object?

When I want to hide window, I use 
myWindow.hide();

But can I hide Fl_Widget inherited object?

Thanks Mike

Greg Ercolano

unread,
May 20, 2017, 12:46:50 PM5/20/17
to fltkg...@googlegroups.com
Yes; hide() is one of Fl_Widget's members.

From the docs:

http://www.fltk.org/doc-1.3/classFl__Widget.html#a1fe8405b86da29d147dc3b5841cf181c
"""
void Fl_Widget::hide()
virtual

Makes a widget invisible.

See Also
show(), visible(), visible_r()
"""

Albrecht Schlosser

unread,
May 21, 2017, 10:13:26 AM5/21/17
to fltkg...@googlegroups.com
(Yes, as Greg pointed out.)

Your question is about Fl_Button, but my following advice is true for
all widget and other classes in our doxygen documentation.

To find out whether a widget has a particular method you can open the
docs, select 'classes', and find your class, e.g. for Fl_Button:
http://www.fltk.org/doc-1.3/classFl__Button.html

You'll see a list of public, protected, static, etc. member functions.
This is a list of methods defined for this class, i.e. not of those
inherited from any parent (base) class. Under "Additional Inherited
Members" you see another list of member functions inherited from base
classes. You can click on each to expand the list of these methods.

For deeper nested widget hierarchies this is not very helpful because
you'd need to click on each list item to search for the method or
methods you want to see. But there's another feature that I really
recommend and personally use often:

Click on "List of all members" at the top right corner of the class
documentation. This opens a sorted list of all methods together with the
class they are inherited from and some attributes like inline,
protected, virtual, static, and maybe more.

This list is even useful if you don't know what exact method name you're
looking for because it gives you a good overview of all methods.

Reply all
Reply to author
Forward
0 new messages