in TCL TK I have a huge gui that I’m trying to explore. using a tcl procedure that does the exploration, I noticed that winfo and cget provides différents information for width parameter of widgets. how is it possible ? which one is the real width of the widget ?
bonus question : sometimes I have some frame widget that don’t have the width parameter: I have an error where trying to configure it or trying to read it (cget). how is it possible as some other frames don’t have this problem.
for instance, here the width is different :
-children of .main.frame are :
-widget_path = .main.frame.note
-class (winfo) = NoteBook
-name (winfo) = note
-width (winfo) = 1068
-height (winfo) = 685
-manager (winfo) = pack
-width_cget = 2000
-using configure to configure width at 2000 of .main.frame.note :
-width_cget = 2000
-height (winfo) = 685
also here I have some frame that have width parameter :
##########################
-children of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.l are :
-end of children of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.l
-widget_path = .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f
-class (winfo) = Frame
-name (winfo) = f
-width (winfo) = 1
-height (winfo) = 1
-manager (winfo) = pack
-width_cget = 2000
-using configure to configure width at 2000 of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f :
-width_cget = 2000
-height (winfo) = 1
and another frame that don’t have :
##########################
-children of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f are :
-widget_path = .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f.swf
-class (winfo) = Frame
-name (winfo) = swf
-width (winfo) = 1
-height (winfo) = 1
-manager (winfo) = pack
-@E: impossible to read with cget the width of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f.swf: unknown option "-width"
-using configure to configure width at 2000 of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f.swf :
-@E: impossible to configure widthet 2000 for .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f.swf: unknown option "-width"
-@E: impossible to read with cget the width of .main.frame.note.fedac32.pw.f0.frame.pwhoutil.f1.frame.frame_fichiers.f.swf: unknown option "-width"
-height (winfo) = 1
how is it possible ?