|
From: Joe E. <jen...@fl...> - 2004-09-03 15:42:20
|
Hello,
> I'm trying to build a project on Tk/Aqua using the tile toolkit. I'm
> having some trouble with the notebook widget, and am unsure how to proceed.
> [...]
I just posted a followup to a similar question on comp.lang.tcl;
reply below. Does this help?
[ ... copied from <UR: news:cha...@ne... > ]
Kevin Walzer wrote:
>
>I'm trying to create a GUI using the Tile theming system and I'm having
>problems with the notebook widget. Here's my code:
> [... see below ...]
>I want the two tframe widgets (.notebookholder.nb.stuff and
>.notebookholder.nb.f1) to be the tabs, and the two tlabel widgets
>(.notebookholder.nb.label1 and .notebookholder.nb.label2) to be the
>child widgets, i.e. the windows that are displayed beneath the tabs.
The notebook doesn't work that way -- the tabs are part
of the notebook widget itself, they aren't subwidgets.
> But this code only gets me the tabs with no windows underneath.
The notebook actually is displaying the subwidgets you've
added in the pane area, but since you haven't packed anything
into the frames or given the labels anything to display,
the pane looks empty. Try:
.notebookholder.nb.label1 configure -text "Hello!"
to see.
--Joe English
[ original code: ]
>#make notebook
>tframe .notebookholder
>pack .notebookholder -side top -fill x
>
>tnotebook .notebookholder.nb -padding 6
>.notebookholder.nb add [tframe .notebookholder.nb.stuff] -text "The real
>deal"
>.notebookholder.nb add [tlabel .notbookholder.nb.label1] -text "Not much
>going on here..."
>
>.notebookholder.nb add [tframe .notebookholder.nb.f1] -text "First tab"
>- -underline 4
>.notebookholder.nb add [tlabel .notebookholder.nb.label2] -text
>"TkDarwinPorts rules!"
>
>pack .notebookholder.nb -side bottom -fill y
|