From: Donal F. <don...@ma...> - 2024-08-08 19:20:02
|
Harald Oehlmann <har...@el...> wrote: > That sounds all very complicated. Yes. > Wouldn't it possible: > - to use a default class name (like TkMain) ? Yes, except there's almost no case where a universal default makes any sense. > - Modify the class name by an explicit option (like wish.exe -toplevelclassname > myname). We already have options support and the current mechanism > ignores it. So (wish.exe -- scale) still sees "scale" > as class name. That option is called -name (with the class being the same as the name but with the first letter capitalised). It needs to be in argv at the point when Tk creates the main toplevel, and has been a feature of Tk since before I started using Tk. Correspondingly, toplevels (and frames, because they share very much code) also have a -class option (their name being the last element of their Tk dotted path). * https://www.tcl-lang.org/man/tcl8.6/UserCmd/wish.htm#M16 * https://www.tcl-lang.org/man/tcl8.6/TkCmd/toplevel.htm#M7 Donal. |