|
|
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 ] | |
|
| |