How to put filenames on a menu? Topic is solved
-
- In need of some credit
- Posts: 7
- Joined: Sat Mar 05, 2011 5:10 pm
- Location: Philippines
How to put filenames on a menu?
I want to make a submenu where its menuitems are txt files on a folder with which, could be changed. I mean, the txt files could be deleted or a new file could be added on that folder. Something that. A menu that lists the files at a certain folder. But the problem is, i dont kn0w how 2do it. Pls someone help.pls!
Blackbird singing
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
Re: How to put filenames on a menu?
1. You can try to use wxFileSystemWatcher in wxWidgets 2.9.1+ and manually append and remove file items in menu.
But this is a bad user interface design idea. Menu is intended only for commands and options, but not for file system mapping.
So you can use:
2. Open file menu to select file with wxFileDialog with a file mask
3. wxDialog with placed wxListBox or wxChoice with filled file names
But this is a bad user interface design idea. Menu is intended only for commands and options, but not for file system mapping.
So you can use:
2. Open file menu to select file with wxFileDialog with a file mask
3. wxDialog with placed wxListBox or wxChoice with filled file names
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
what about XML file contaning menus?
Load them using class below
http://docs.wxwidgets.org/trunk/classwx ... ource.html
Load them using class below
http://docs.wxwidgets.org/trunk/classwx ... ource.html
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
-
- In need of some credit
- Posts: 7
- Joined: Sat Mar 05, 2011 5:10 pm
- Location: Philippines
@kolya
1.may i request for an example of that?
2.
@to anyone:
01 wxstring filename;
02 mybar=new wxmenubar;
03 mymenu=new wxmenu;
04 mymenu->Append(wxID_ANY, wxT(&filename));
05 mybar->(mymenu, wxT("&Menu"));
SetMenuBar(mybar);
06
Is this valid? Specially line 4?
2.
@to anyone:
01 wxstring filename;
02 mybar=new wxmenubar;
03 mymenu=new wxmenu;
04 mymenu->Append(wxID_ANY, wxT(&filename));
05 mybar->(mymenu, wxT("&Menu"));
SetMenuBar(mybar);
06
Is this valid? Specially line 4?
Blackbird singing
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
-
- In need of some credit
- Posts: 7
- Joined: Sat Mar 05, 2011 5:10 pm
- Location: Philippines
And
@kolya
is there a class similar to wxFileSystemWatcher on 2.8.11? Im using wxdev Cpp, and 2 be frank, im a bit confused of rapid changes from later to upgraded version of wxwiddget. Im just starting to learn 2.8.11. But, anyway, if it the answer is no, its ok. Thx 4 d help.
is there a class similar to wxFileSystemWatcher on 2.8.11? Im using wxdev Cpp, and 2 be frank, im a bit confused of rapid changes from later to upgraded version of wxwiddget. Im just starting to learn 2.8.11. But, anyway, if it the answer is no, its ok. Thx 4 d help.
Blackbird singing
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
in the dead night
take this sunken eyes
and learn to see
all your life
you are only waiting
for this moment
TO BE FREE
blackbird fly
into the light of
a dark black night
--(john lenon)
Re: @kolya
You can see fswatcher and menu samples. And use wxFileName::SplitPath to extract file name from file path to show in menu.Devildevilira wrote:1.may i request for an example of that?
Is this valid? Specially line 4?
Code: Select all
wxString filename;
wxMenuBar *mybar = new wxMenuBar;
wxMenu * mymenu = new wxMenu;
mymenu->Append(wxID_ANY, filename);
mybar->Append(mymenu, wxT("&Menu"));
SetMenuBar(mybar);
No.Devildevilira wrote: is there a class similar to wxFileSystemWatcher on 2.8.11?