Sounds like you want to right justify a widget in the item.
Not easy, since there's no flag currently that forces the child widget() to resize to fit the width of the tree. But it can be done with a combo of a custom item (to force the widget()'s size just before drawing it), and a custom widget which would contain your buttons responding to events or whatever.
Here's an example which makes a group with two button children; b1 (left justified, stretches in size), and b2 (right justified, remains fixed size):
tree-custom-right-justified.cxx.txt
As you resize the window, the group resizes, keeping 'b2' right justified at all times, this behavior is regular Fl_Group behavior defined by the resizable()s defined.
If you want more customized resize/handle behavior, you can derive your own FLTK class and make that the child widget do exactly what you want, and use it in place of the Fl_Group/Fl_Button's shown here.
Meanwhile, I can open a separate RFE issue requesting a new flag that forces any child widget() to resize to the full width of the item.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
[ Direct Link to Message ] |