|
|
On 10/6/22 19:33, roger tunnicliffe wrote:
Thx Greg.
Yes, win2_accountNoX was an effort to produce an alphanumeric
spinner (I couldn't find one in fltk, I guess you could tell me
if there is one).
No spinner for alphanumerics, if I understand you correctly.
Fl_Spinner AFAIK is numeric only.
You can of course make a custom composite widget that derives
from an Fl_Group with two up/down buttons around an Fl_Input
widget,
the up/down buttons invoke a callback that handles cycling the
alphanumerics in the way you want, and you can provide methods
that get/set the value. Fl_Input would both show the value and
also
let someone just go ahead and type it in.
If that sounds useful we can advise, just describe how the
alphanumeric
aspect should work.
It's be best if for this thread if you could reduce the app to
just the FLTK
code, without the non-FLTK stuff to demo the problem. So if
the problem
ist just with the win2 window's widgets, and the menu items
aren't important,
then reduce the test app to just that, so anyone here can
build and run.
It did not display too well as you have noted but this
morning I have re-coded that with
win2_accountNo->color(0xE1E1E100);
win2_accountNo->textcolor(0xE1E1E100);
which hides the the numeric value nicely.
I just don't think you can put both an Fl_Spinner and Fl_Output
overlapping each other.
That's just going to give unpredictable behavior, even if it
"works".
If the 1M "delay" is making it work, it's most likely by fluke.
Try replacing those two widgets with just an Fl_Output and see
if the drawing problems go away.
If so, then you should be able to make a composite widget by
deriving
a class from Fl_Group that has up/down arrows around an
Fl_Output
that will do what you want without overlapping widgets.
--
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/1db08487-dfc6-7df4-b85a-f25578decadb%40seriss.com.
[ Direct Link to Message ] | |
|
| |