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

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -