Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
GeneralThreads and System.Timers.Timer - Problems Pin
stan281-Jul-05 20:41
stan281-Jul-05 20:41 
GeneralRe: Threads and System.Timers.Timer - Problems Pin
S. Senthil Kumar1-Jul-05 21:22
S. Senthil Kumar1-Jul-05 21:22 
GeneralRe: Threads and System.Timers.Timer - Problems Pin
stan283-Jul-05 7:37
stan283-Jul-05 7:37 
GeneralRe: Threads and System.Timers.Timer - Problems Pin
leppie2-Jul-05 6:47
leppie2-Jul-05 6:47 
GeneralRe: Threads and System.Timers.Timer - Problems Pin
stan283-Jul-05 7:40
stan283-Jul-05 7:40 
GeneralPlz Help on Net Send Pin
Member 122691721-Jul-05 19:18
Member 122691721-Jul-05 19:18 
GeneralRe: Plz Help on Net Send Pin
Dario Solera1-Jul-05 23:40
Dario Solera1-Jul-05 23:40 
GeneralIntegration of Window Service and my project through set up program Pin
ksanju10001-Jul-05 19:09
ksanju10001-Jul-05 19:09 
GeneralRe: Integration of Window Service and my project through set up program Pin
mav.northwind1-Jul-05 20:10
mav.northwind1-Jul-05 20:10 
GeneralHey all, i have a bit of a problem with event handlers... Pin
tom_dx1-Jul-05 16:43
tom_dx1-Jul-05 16:43 
GeneralRe: Hey all, i have a bit of a problem with event handlers... Pin
ACorbs1-Jul-05 17:02
ACorbs1-Jul-05 17:02 
GeneralSorting problem Pin
damir_tk1-Jul-05 11:25
damir_tk1-Jul-05 11:25 
GeneralRe: Sorting problem Pin
Guffa1-Jul-05 12:34
Guffa1-Jul-05 12:34 
GeneralDynamic Menus in C# Pin
0ryan01-Jul-05 9:08
0ryan01-Jul-05 9:08 
GeneralRe: Dynamic Menus in C# Pin
rudy.net1-Jul-05 18:01
rudy.net1-Jul-05 18:01 
The problem is that you are not creating an instance of the menuitems. Use an ArrayList to store each new menu item. Also, it's best to add the menuitems in your method "AddItem_Click". So modify the AddItem_Click as follows:
<br />
	ArrayList arr = new ArrayList(); <br />
	private void AddItem_Click(object sender, System.EventArgs e)<br />
	{<br />
		this.ListItemCount++;<br />
		this.ListBox.Items.Add( "item" + ListItemCount.ToString() );<br />
<br />
		//code to add to dynamic menu<br />
		MenuItem mi = new MenuItem("item"+ListItemCount.ToString());<br />
		arr.Add(mi);<br />
		this.ListItems.MenuItems.Add(mi);<br />
	}<br />
>/code>

GeneralSendMessage Pin
ladwah1-Jul-05 8:46
ladwah1-Jul-05 8:46 
GeneralRe: SendMessage Pin
Judah Gabriel Himango1-Jul-05 9:47
sponsorJudah Gabriel Himango1-Jul-05 9:47 
GeneralRe: SendMessage Pin
ladwah1-Jul-05 10:36
ladwah1-Jul-05 10:36 
GeneralC# Threading problem Pin
X3mFran1-Jul-05 7:50
X3mFran1-Jul-05 7:50 
GeneralRe: C# Threading problem Pin
S. Senthil Kumar1-Jul-05 8:34
S. Senthil Kumar1-Jul-05 8:34 
GeneralRe: C# Threading problem Pin
X3mFran1-Jul-05 8:58
X3mFran1-Jul-05 8:58 
GeneralDataGrid row tag Pin
Jassim Rahma1-Jul-05 7:04
Jassim Rahma1-Jul-05 7:04 
GeneralRe: DataGrid row tag Pin
Steve Maier1-Jul-05 7:23
professionalSteve Maier1-Jul-05 7:23 
GeneralRe: DataGrid row tag Pin
glenn2011-Jul-05 12:46
glenn2011-Jul-05 12:46 
GeneralRe: DataGrid row tag Pin
Jassim Rahma1-Jul-05 12:54
Jassim Rahma1-Jul-05 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.