FLTK logo

Re: [fltk.general] test/tabs

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: test/tabs Albrecht Schlosser Oct 30, 2020  
 
On 10/30/20 8:00 PM Greg Ercolano wrote:
On 2020-10-30 05:30, holm.h...@gmail.com wrote:

Hello,

I need to hide() a group which is under a group.

That functionality should be in the test/tabs program:
       { Fl_Group* o = new Fl_Group(10, 60, 315, 235, "@fileprint  &print");
         o->tooltip("tab5 verifies if visibility requests are handled correctly");
         o->hide();

For me the tab do however show.

any suggestions ?


     Since Fl_Tabs uses the hide() / show() flag on the immediate child groups
     to make them show when a tab is clicked, I don't think setting hide() on
     the tab child groups will be effective, as Fl_Tabs will override it depending
     on which tab is clicked.

Yep, that's the point I wanted to make as well. Setting hide() on all included children is only an initialization.

I believe the OP would want to use the Fl_Tabs::value(Fl_Widget *) method to establish the tab group being actively shown(), see:

https://www.fltk.org/doc-1.4/classFl__Tabs.html#a188bef71735c167e44af095ddd4922b6

"int Fl_Tabs::value(Fl_Widget *newvalue) 	

Sets the widget to become the current visible widget/tab.

Setting the value hides all other children, and makes this one visible, if it is really a child."


The last part of the last sentence is important: the argument to value(Fl_Widget *) must be one of the direct children (i.e. one of the Fl_Groups) used in the Fl_Tabs widget.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/e3cf9caf-1dc8-7a22-e446-092ce85a9a18%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.