Re: Tcl/Tk - Observations from a newbie.
From: Victor Wagner (vitus_at_45.free.net)
Date: 08/23/04
- Next message: Andres Garcia: "Re: Creating event sources"
- Previous message: Victor Wagner: "Cross-platform deploying (Was: Tcl/Tk - Observations from a newbie.)"
- In reply to: Sektor van Skijlen: "Re: Tcl/Tk - Observations from a newbie."
- Next in thread: lvirden_at_gmail.com: "Contributing to the community [Was: Re: Tcl/Tk - Observations from a newbie."
- Reply: lvirden_at_gmail.com: "Contributing to the community [Was: Re: Tcl/Tk - Observations from a newbie."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Aug 2004 05:48:05 +0000 (UTC)
Sektor van Skijlen <ethouris@wp.spamu.lubie.nie.pl> wrote:
> I'd rather propose somethink like "actions" in Qt, that is, objects, which
> bind the keyboard shortcut, menu entry and toolbar button.
This can be quite easily implemented in pure Tcl. I've written something
alike for my last project.
There was a concept of "operation" which have name, command and keyboard
shortcut as properties. Operations can be enabled and disabled.
If you want to add operation to menu, just say
operationMenu $menu and it would perform $menu add command with all
appropriate parameters, and also remember than this menu entry should be
enabled/disabled along with entire operation.
Same thing with operationButton command, which allows to specify
alternate (typically shorter) text, and/or image.
If either of them is specifed, full name of operation is used as tooltip
for button.
There is also commands to disable/enable groups of operations.
May be I should polish this code and submit it to something like tklib.
--
As pointed out in a followup, Real Perl Programmers prefer things to be
visually distinct.
-- Larry Wall in <199710161841.LAA13208@wall.org>
- Next message: Andres Garcia: "Re: Creating event sources"
- Previous message: Victor Wagner: "Cross-platform deploying (Was: Tcl/Tk - Observations from a newbie.)"
- In reply to: Sektor van Skijlen: "Re: Tcl/Tk - Observations from a newbie."
- Next in thread: lvirden_at_gmail.com: "Contributing to the community [Was: Re: Tcl/Tk - Observations from a newbie."
- Reply: lvirden_at_gmail.com: "Contributing to the community [Was: Re: Tcl/Tk - Observations from a newbie."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|