FLTK logo

Re: [fltk.general] Re: Fl_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: Re: Fl_Tabs Greg Ercolano Sep 03, 2021  
 

On 9/3/21 8:58 AM, Bill Spitzak wrote:

I agree, and your fix is probably correct.

I think that show() and hide() in value() was because I was worried that the tabs could get into some kind of incorrect state where the number that are visible is not one, and this is trying to fix that. I think now that is probably a mistake, such states should not happen, and it would be better to just return the first visible one or null if none are visible. If this is a problem it would be better to fix it when there is an attempt to set the value, rather than when it is read.

    It might be good to enforce this "somewhere".. perhaps in a protected or public
    recalc() method that simply blesses the state of the widget to sanity, just so that
    if the user somehow leaves all groups hidden, e.g. in fluid, Fl_Tabs() will at least
    come up with a sane default.

    Perhaps on the first call to draw(), as you kinda want this to happen after the
    widget ctor and after all the child widgets have been added, but before a draw().

--
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/e7d9e8f7-2c60-6f1f-a6cd-300a39c3150b%40seriss.com.
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'.