Harald Oehlmann
unread,Mar 8, 2023, 12:50:16 PM3/8/23You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Dear Csaba, dear Tk experts,
Thanks for great "scrollutil::scrollednotebook".
I would like to have the width of a notebook exactly equal to the
maximum of the width of the managed frames.
The same for the height.
In BWidget, there is the command compute_size to update the widget on
any changed sizes.
What I observe with
scrollutil::scrollednotebook -width 0 -height 0
1) If the tabs take more space than the clients, the widget is enlarged.
2) if the content frame resizes, the widget resizes in x direction, but
not in y direction. In my case, resize is triggered by font size change.
The tab label font is also changed, and the tabs correctly resize.
It would be great to have an option or a method to resize to max of
client windows.
When I read Csabas doc, I see that this is a certain mess:
Unlike the ttk::notebook widget, whose -width option is quite often
overridden by the total width of the tabs, the scrollednotebook widget
respects the value of its -width option, regardless of the space
required by the tabs.
-> is there potential for a bug report for Tk?
-width: If present and greater than zero, specifies the desired width
for the widget in any of the forms acceptable to Tk_GetPixels.
Otherwise, the widget's width is set to the requested width of the
ttk::notebook contained in it (which in turn depends, among others, on
the maximum width of all panes and the total width of the tabs),
immediately after the scrollednotebook gets mapped. The default is 10c,
which should be overridden with a suitable application-specific value.
Thank you all,
Harald