Code Comments
Programming Forum and web based access to our favorite programming groups.Hello all, I'm currently diving in Tk programming aspect. Until now I've mainly written pure Tcl (no graphical) application. My Tk knowledge is rather limited to the simplest gui. As far as I've seen on tutorial, wiki or here, there is common advice to withdraw the . toplevel. It seems to be related to the fact that when this window is closed the no more Tk action can be performed. Is that correct ? Following this advice, I systematically create another toplevel widget for the gui, but there is slight difference with its window manager interaction: It does not have the any miniaturize button. I've been looking in the wm man page but did not found anything clearly related to this aspect. I'm also trying to desactivate the destroy button, but did not find anything else than "wm protocol $window WM_DELETE_WINDOW. It's a way to disable uncontrolled window close event, but I would like to make it visible to the user. Is there anyway to do this ? ------------------------------ David Bariod For email replace spam by tel
Post Follow-up to this messagedbariod@norspam.com wrote: > > Hello all, > > I'm currently diving in Tk programming aspect. > Until now I've mainly written pure Tcl (no graphical) application. > My Tk knowledge is rather limited to the simplest gui. > As far as I've seen on tutorial, wiki or here, > there is common advice to withdraw the . toplevel. > It seems to be related to the fact that when this window > is closed the no more Tk action can be performed. > Is that correct ? > More or less correct - it is an indication that the program should close down, and normally it will just do that. > Following this advice, I systematically create > another toplevel widget for the gui, > but there is slight difference with its window manager interaction: > It does not have the any miniaturize button. > I've been looking in the wm man page but did not found > anything clearly related to this aspect. > What platform are you using? I have tried on Linux and Windows: I have no problem - the system close button or equivalent is always present. > I'm also trying to desactivate the destroy button, > but did not find anything else than "wm protocol $window WM_DELETE_WINDOW. > It's a way to disable uncontrolled window close event, > but I would like to make it visible to the user. > Is there anyway to do this ? > I am not sure what you mean by that. Can you explain what effect you want to achieve? How is the close event to be made visible? Regards, Arjen
Post Follow-up to this messageOn Fri, 22 Apr 2005, Arjen Markus wrote: > dbariod@norspam.com wrote: > > > What platform are you using? > > I have tried on Linux and Windows: I have no problem - the system close > button or equivalent is always present. > I'm running on Solaris with WindowMaker as window manager. What do you call the system close button ? I'm talking about the ``miniaturize'' button, meaning the button when clicked put the window to the iconic state. It is not there on window created with the command "toplevel the_topl evel". I will check how the window is displayed on cde and kde window manager, it may be specific to Window Maker. > > > I am not sure what you mean by that. Can you explain what effect you > want > to achieve? How is the close event to be made visible? > For example, I want t not have the button to not appear (on windows) or, on WindowMaker, to have the special layout which means "You can not click on this button". ------------------------------ David Bariod For email replace spam by tel
Post Follow-up to this messagedbariod@norspam.com wrote: > > On Fri, 22 Apr 2005, Arjen Markus wrote: > > > I'm running on Solaris with WindowMaker as window manager. > What do you call the system close button ? > I'm talking about the ``miniaturize'' button, > meaning the button when clicked put the window to the iconic > state. It is not there on window created with the command "toplevel the_to plevel". > I will check how the window is displayed on cde and kde window manager, > it may be specific to Window Maker. > Window managers sometimes have very particular ideas on what they should do. I am not familiar with this one and I have a hunch that it is indeed WM-specific. (I misread the "miniaturise" as "close" - this is moslty called the iconify button) > > For example, I want t not have the button to not appear (on windows) > or, on WindowMaker, to have the special layout which means > "You can not click on this button". > Okay, that is clearer. My answer: I do not know how you can achieve that. Regards, Arjen
Post Follow-up to this messageOn Fri, 22 Apr 2005, Arjen Markus wrote: > dbariod@norspam.com wrote: > > Window managers sometimes have very particular ideas on what they should > do. > I am not familiar with this one and I have a hunch that it is indeed > WM-specific. > I confirm this is clearly a WindowMaker bug. The iconify button __sometime__ does not appear, the occurence of the problem is also seems related with the name of the toplevel. It works perfectly on cde or kde. > > > Okay, that is clearer. My answer: I do not know how you can achieve > that. I will stay with the wm protocol solution. ------------------------------ David Bariod For email replace spam by tel
Post Follow-up to this messagedbariod@norspam.com writes: > I confirm this is clearly a WindowMaker bug. > The iconify button __sometime__ does not appear, > the occurence of the problem is also seems related with the name > of the toplevel. Could it be that the problematic names are known to the WM as some other applications, with registerd preferences for no minimize button? Maybe it allows minimize control over only the first wndow with the same title? Sometimes the title is used by a WM or "desktop environment" to assign a mini-icon and to group windows on a task-bar, so this case may be similar. -- Donald Arseneau asnd@triumf.ca
Post Follow-up to this messageOn Sat, 22 Apr 2005, Donald Arseneau wrote: > dbariod@norspam.com writes: > > > Could it be that the problematic names are known to the WM as > some other applications, with registerd preferences for no > minimize button? > It might be. I'm writing a package which dynamically generates widget names in order to not have anymore any widget path name hardcoded within the application. I merely use a base string pattern concatened with a numerical id. > > Maybe it allows minimize control over only the first wndow with > the same title? > Don't know, but it's not the case I'm in, because each window has a different title. > Sometimes the title is used by a WM or "desktop environment" to > assign a mini-icon and to group windows on a task-bar, so this > case may be similar. > Long time I did not write any plain/good/raw X code. I almost forget everything about these X resources. For now I've just changed the string pattern used for widget name generation. It seems to work, that's ok for now. I will check what the problem was later. Thanks for help and advices. ------------------------------ David Bariod For email replace spam by tel
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.