A good menu tutorial?
- From: "Robert Hicks" <sigzero@xxxxxxxxx>
- Date: 30 Aug 2006 09:36:38 -0700
I would like to create a dynamic menu when the application starts. I
have a directory structure like:
Courses/Name1
Courses/Name2
I would like Name1 and Name2 (and so on) to become sub-menus of the
Courses top level menu.
Courses
Name1
Name2
That way a user can create another directory and it will automatically
be added. Eventually I will have files in those directories that will
sub-menu names etc. So if you create a directory name of "Test" and add
files called "test1.txt" and "text2.txt" then the menu would look like:
Courses
Name1
Name2
Test
test1 # this will open the file into the application
test2 # ditto
I have the home of the script set like:
set home [file dirname [info script]]
So I guess I can do a foreach on "$home/Courses/" to get the dir names
and file names? I am not sure how to build a menu with that though.
Anyone done something like this?
Robert
.
- Follow-Ups:
- Re: A good menu tutorial?
- From: suchenwi
- Re: A good menu tutorial?
- Prev by Date: Tcl Plug-In for Eclipse
- Next by Date: Re: A good menu tutorial?
- Previous by thread: Tcl Plug-In for Eclipse
- Next by thread: Re: A good menu tutorial?
- Index(es):