tcl/tk button or toplevel pathname conventions -
when 1 creates new toplevel or button in tk, 1 needs enter pathname. have seen basic code looks like:
toplevel .a ... button .a.b ...
my question is: dots treated differently letters? sort of hierarchy delimiters, create parent child relationship? have looked @ wiki tk , failed find answer that. many thanks, -lior
as other answers have said, dots used represent hierarchy, / or \ used represent filesystem hierarchy.
placing widgets in hierarchy not, strictly speaking, necessary. 1 advantage in doing geometry managers such grid , pack default managing children in parents. example 'pack .a.b.c' pack widget a.b.c within widget .a.b. makes easy simple layouts.
the same effect in many cases can achieved telling grid , pack container child should placed. foe example, 'pack .c -in .a.b' put widget .c in container .a.b. let's keep hierarchy shallow, , makes refactoring little easier.
see http://www.beedub.com/book/2nd/tkintro.doc.html introduction tk fundamentals.
Comments
Post a Comment