anyone else have any ideas? I am stuck until I figure this out
jroberson10
Posts
-
Dynamic Menu Creation Problem -
Dynamic Menu Creation ProblemThats just it. When I run the code again nothing happens. It completes and the menu stays the same. I tested this by not populating it on application start and only trying to populate after adding a new bookmark. When I do that the menu stays empty.
-
Dynamic Menu Creation ProblemWhat I am asking is how do I "repopulate" the menu?
-
Dynamic Menu Creation Problemthe code I posted does both.
-
Dynamic Menu Creation ProblemWhen I add a bookmark I want the dynamic menu to update and show the new bookmark without me having to restart the program.
-
Dynamic Menu Creation ProblemI am trying to teach myself C# and I have started writing a web browser based on mozilla gecko. Right now I am working on storing and retrieving bookmarks from an xml document. I can save and read the bookmarks just fine. However in order to see a bookmark I just added I must exit the program and restart it. I have tried calling the function that populates the menu after the new bookmark is written to the xml file but it runs and loads everything but the new bookmark. Below is the code I use to populate the menus.
public void PopulateBM()
{ string filename = "bookmarks.xml"; if(File.Exists(filename)) { XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(filename); XmlNodeList xmlnode = xmldoc.GetElementsByTagName("Bookmark"); for (int i = 0; i < xmlnode.Count; i++) { ToolStripMenuItem item = new ToolStripMenuItem(); item.Text = xmlnode\[i\].FirstChild.InnerText; item.Tag = xmlnode\[i\].LastChild.InnerText; item.ToolTipText = xmlnode\[i\].LastChild.InnerText; item.Click += new EventHandler(this.item\_Click); this.bookmarksToolStripMenuItem.DropDownItems.Insert(3,item); } } }
-
C# ProjectHow is this a waste of time, you saw it, people can learn from this, maybe even solve problems with similar programs they may be writing. All i did was as a question. Instead of whining why dont you just simply state the proper location for this post.
-
C# ProjectHere is my description from getdotnet.com This will be an eventual os independant grouping of office style applications written in C#. Eventually I also hope to have them web based so you can work with your files from anywhere. As any good programmer should, I will ensure cross compatability with as many other applications related to this application package. Once completed and satisfied with the results portions of the code will be open source and if a proper response is recieved then the whole application package will be open source. As of now only two out of the endless possibilities of applications have been laid out on paper and organized. Those are a web browser and email program. There will be a word processor, spreadsheets, Databases, presentation tools, html/xml/php editors, maybe even a graphics program sub package. http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=21691a22-ddfe-4fd0-8ce0-88e8b05ed341 I need people asap that would like to help with the project. Im just doing this cause i can. But i do need a bit of help on the coding if i want to finish before im 40. Email: jd@lucidmind.org AIM: jdogg172