On 10 May 2002 23:56:31 +0200, Jodok Ole Müllers wrote: > > Has anybody an idea how to ceate a "toggle" button. > I want to press it and if the winlist is off it will turn it on > and if it is on it will turn it of. > > Pseuydocode: > > ... > *FvwmButtons(Title "Toggle Winlist",ActionToggleFvwmWinlist ) > .... > > > AddToFunc ToggleFvwmWinlist > + Module FvwmWinList if WinListIsOff > + KillModule FvwmWinList if WinListIsOn
Even if it looks like a classic if-else problem that is only easily solvable in 2.5.x versions, it may be easily done in 2.4.x+ too due to the way Module and functions in FVWM work: AddToFunc ToggleFvwmWinList + I None (FvwmWinList, CirculateHit) Module FvwmWinList + I Next (FvwmWinList, CirculateHit) Close "Module FvwmWinList" is guaranteed to create a new window only after a function is finished and "Next Close" is failed. Regards, Mikhael. -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]