Windows Develop Bookmark and Share   
 index > Windows Forms General > data-driven menu
 

data-driven menu

Hi,

I would like to populate a menu with a directory structure, is it possible to do it programmatically? any sample code?

thanks in advance

Belinda

BLiu  Thursday, January 03, 2008 6:21 PM
Tergiver  Thursday, January 03, 2008 9:30 PM
Tergiver wrote:

And if you really want to use a menu then RTFM (http://msdn2.microsoft.com/en-us/library/system.windows.forms.menu(VS.71).aspx).

How to enumerate a directory structure (http://msdn2.microsoft.com/en-us/library/system.io.directory.getdirectories.aspx)



Both Menu (1.0, 1.1) and MenuStrip can be created and added to a MainMenu or MenuStrip (or even ContextMenu or ContextMenuStrip) respectively.

You'd basibacally would want to tie the two concepts together:

Psudocode Block

MenuStripItem RecursiveDirectoryToMenu( DirectoryInfo curDirectory )
{

MenuStripItem temp = new MenuStripItem( curDirectory .Name );
foreach( DirectoryInfo d in curDirectory.GetDirectories() )
{
temp.MenuItemChildren.Add(RecursiveDirectoryToMenu( d ) );
}
return temp;
}

that's the general concept, you'd call this function when you wanted to create your directory menu structure, then you get back a MenuStripItem that you can add anywhere you can put a MenuStripItem.

Directory traversal is slow, and the recursion doesn't help speed things up, unless of course you work in 3.5 with the CTP of the ParallelFx library, but even then you'll still have an IO bottleneck (quering for the directory structure).
IsshouFuuraibou  Friday, January 04, 2008 12:18 AM

Hi,

I have a bit experience in this kind of Data Driven Menu schemes. Here is a pratical way of doing things

step 1: First you need to store menu details:

You have two options for storing the menu details

1) XML

2) Database

Create the hierarchical structure in XML that exactly represents theMenu structure something similar to here:

Code Block

<MENU>

<MENUCOMMANDNAME="File" Level="Top" Parent="None"Type="MenuItem"/>

<MENUCOMMANDNAME="FileNew" Level="Second" Parent="File" Type="MenuItem"/>

</MENU>

This is just an example you can change attributesaccording to your needs.

STEP 2: Before form load Load The Xml Structure

STEP 3: Loop through the Xml Structure (visit the thread by RudeDog2 on reading Xml File)

STEP 4: Create the menuitems at runtime and associate with Menustrip

I have given a practical data driven dynamic menu creation. But you have to write the code ( sorrry).

If you need some sophisticated Menu driven. Try to use Composite Application Block from Microsoft Patterns & Practices. In the Bankexample there is a component called UIElementBuilder which dynamically builds Menus.

Rajamannar-Xface  Friday, January 04, 2008 2:15 PM

Is this a windows application? Ever heard of TreeView

http://msdn2.microsoft.com/en-us/library/system.windows.forms.treeview.aspx

Rudedog2  Thursday, January 03, 2008 7:30 PM
Tergiver  Thursday, January 03, 2008 9:30 PM

I already tried the TreeView but it does not have the look of Menu dropdown, that is why I want to give the menu a try.

thanks for all the advices giving.

Belinda

BLiu  Thursday, January 03, 2008 9:53 PM
BLiu wrote:

I already tried the TreeView but it does not have the look of Menu dropdown, that is why I want to give the menu a try.

thanks for all the advices giving.

Belinda

Belinda,

Your question is no longer clear. Just what are you looking for? What code have you created so far?

Rudedog

Rudedog2  Thursday, January 03, 2008 10:19 PM
Tergiver wrote:

And if you really want to use a menu then RTFM (http://msdn2.microsoft.com/en-us/library/system.windows.forms.menu(VS.71).aspx).

How to enumerate a directory structure (http://msdn2.microsoft.com/en-us/library/system.io.directory.getdirectories.aspx)



Both Menu (1.0, 1.1) and MenuStrip can be created and added to a MainMenu or MenuStrip (or even ContextMenu or ContextMenuStrip) respectively.

You'd basibacally would want to tie the two concepts together:

Psudocode Block

MenuStripItem RecursiveDirectoryToMenu( DirectoryInfo curDirectory )
{

MenuStripItem temp = new MenuStripItem( curDirectory .Name );
foreach( DirectoryInfo d in curDirectory.GetDirectories() )
{
temp.MenuItemChildren.Add(RecursiveDirectoryToMenu( d ) );
}
return temp;
}

that's the general concept, you'd call this function when you wanted to create your directory menu structure, then you get back a MenuStripItem that you can add anywhere you can put a MenuStripItem.

Directory traversal is slow, and the recursion doesn't help speed things up, unless of course you work in 3.5 with the CTP of the ParallelFx library, but even then you'll still have an IO bottleneck (quering for the directory structure).
IsshouFuuraibou  Friday, January 04, 2008 12:18 AM
One way to solve the issue of it being slow would be to populate children only when (and if) they are opened by the user. This is no simple matter, but might be worth considering.

Tergiver  Friday, January 04, 2008 2:44 AM

Hi,

I have a bit experience in this kind of Data Driven Menu schemes. Here is a pratical way of doing things

step 1: First you need to store menu details:

You have two options for storing the menu details

1) XML

2) Database

Create the hierarchical structure in XML that exactly represents theMenu structure something similar to here:

Code Block

<MENU>

<MENUCOMMANDNAME="File" Level="Top" Parent="None"Type="MenuItem"/>

<MENUCOMMANDNAME="FileNew" Level="Second" Parent="File" Type="MenuItem"/>

</MENU>

This is just an example you can change attributesaccording to your needs.

STEP 2: Before form load Load The Xml Structure

STEP 3: Loop through the Xml Structure (visit the thread by RudeDog2 on reading Xml File)

STEP 4: Create the menuitems at runtime and associate with Menustrip

I have given a practical data driven dynamic menu creation. But you have to write the code ( sorrry).

If you need some sophisticated Menu driven. Try to use Composite Application Block from Microsoft Patterns & Practices. In the Bankexample there is a component called UIElementBuilder which dynamically builds Menus.

Rajamannar-Xface  Friday, January 04, 2008 2:15 PM
Rudedog2  Friday, January 04, 2008 2:53 PM

I am on the right track now and are in the middle of populating the menu and hook up event handler.

the directory is a custimized reports ini file structure, should not be too big. If the IO bottleneck does happen later, I will try to preload to XML structure and/or populate children only when they are opened by the user.

Many thanks to all of you.

Belinda

BLiu  Friday, January 04, 2008 5:22 PM
May u try this plz..

MenuStrip msObj = new MenuStrip();

//For Level1: MainMenu1
ToolStripMenuItem tpMenuItem1 = new ToolStripMenuItem();
tpMenuItem1.Name="MenuItem1";
tpMenuItem1.Text = "MyMenuItem1";

//For Level2: SubMenu1
ToolStripMenuItem tpMenuItem11 = new ToolStripMenuItem();
tpMenuItem11.Name="MenuItem11";
tpMenuItem11.Text = "MyMenuItem11";

//Adding the Level2 of SubMenu Item1 to Level1 of MainMenu
tpMenuItem1.DropDownItems.Add(tpMenuItem11);

//For Level3: SubMenu2
ToolStripMenuItem tpMenuItem12 = new ToolStripMenuItem();
tpMenuItem12.Name="MenuItem12";
tpMenuItem12.Text = "MyMenuItem12";

//Adding the Level2 of SubMenu Item2 to Level1 of MainMenu
tpMenuItem1.DropDownItems.Add(tpMenuItem12);



//For Level1: MainMenu2
ToolStripMenuItem tpMenuItem2 = new ToolStripMenuItem();
tpMenuItem2.Name="MenuItem2";
tpMenuItem2.Text = "MyMenuItem2";  

//For Level2: SubMenu1
ToolStripMenuItem tpMenuItem21 = new ToolStripMenuItem();
tpMenuItem21.Name="MenuItem21";
tpMenuItem21.Text = "MyMenuItem21";

//Adding the Level2 of SubMenu Item1 to Level1 of MainMenu
tpMenuItem2.DropDownItems.Add(tpMenuItem21);


msObj.Items.Add(tpMenuItem1);
msObj.Items.Add(tpMenuItem2);
//msObj.Location = new Point(50, 100); 

this.Controls.Add(msObj);


OutPut Yields :

---------------------------------------------
|tpMenuItem1         |    tpMenuItem2       |
---------------------------------------------
  | tpMenuItem11 |	    | tpMenuItem21 |
  |------------------|           --------------
  | tpMenuItem12 |          
   ------------------

My Best Solutions  Wednesday, September 09, 2009 11:42 AM
My Best Solutions  Wednesday, September 09, 2009 11:50 AM
see this:

<html>
<head>
	<title>Example Page - Codebehind Horizontal 3</title>
	
	<!--// Only needed for this page's formatting //-->
	<style>
		body {font-family: Verdana; font-size: XX-Small; margin: 20px;}
		.title {font-size: X-Large; padding: 20px; border-bottom: 2px solid gray;}
	</style>
</head>
<body>
	<div class="title">Easy Menu - Codebehind Example - Horizontal 3</div>

	<br /><br />
	<a class="examples" href="Default.aspx?type=CSHARP">« Back to examples</a>
	<br /><br /><br />

	Hover these to see the menus.<br><br>
	<!--// This is where the head of the menus (the parent menu) will appear //-->
	<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<script language="javascript" src="/oboutsuite/WebResource.axd?d=POSo-cpKveMxqTDrhcvyH3CK1aISKzyfceA8O0y3osA2qKpLE9WBVMRPQ8CIJ6kGO1z1YFJlymTACY4xP-QwKxZUixoGvpBXRmxQdQAYxTs1&t=633804758426247969"></script>

<link rel="stylesheet" type="text/css" href="/oboutsuite/EasyMenu/styles/horizontal3/style.css" />
<script language="javascript">var ob_em_Menus = new Array('ob_em_MainEM','ob_em_Easymenu1','ob_em_Easymenu2','ob_em_Easymenu4','ob_em_Easymenu5','ob_em_Easymenu6');var ob_em_MenusUniqueRep = {'ob_em_MainEM':'UniqueRenderdMenuID_276a7aff-76e9-48cd-b210-e34a45f5cf12','ob_em_Easymenu1':'UniqueRenderdMenuID_c8d93800-972d-4e9a-9b13-cc4bc7b17a0a','ob_em_Easymenu2':'UniqueRenderdMenuID_f9548179-aade-4638-b3a2-4e9f01da1ba4','ob_em_Easymenu4':'UniqueRenderdMenuID_93d09e1d-bcd3-4cf0-b89c-8d24aa67f07f','ob_em_Easymenu5':'UniqueRenderdMenuID_78233d0c-3c86-480b-b468-d6ebc14c67d6','ob_em_Easymenu6':'UniqueRenderdMenuID_00e54b0f-683e-487e-a3ba-1a6df95b689e'};</script><div attachTo="document" id="MainEM" class="ParentMenu" style="width:330px;display:none;position:relative;top:0px;left:0px;"><table class="ParentItemContainer"><tr><td emType="MenuItem" class="ParentItem"  nohide="false" id="item1"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="ParentItemContentCell" >Item 1</td><td emType="m"  align="right" ><div class="ParentItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td><td emType="MenuItem" class="ParentItem"  nohide="false" id="item2"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="ParentItemContentCell" >Item 2</td><td emType="m"  align="right" ><div class="ParentItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td><td emType="MenuItem" class="ParentItem"  nohide="false" id="item3"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="ParentItemContentCell" >Item 3</td><td emType="m" style="display:none;" align="right" ><div class="ParentItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td><td emType="MenuItem" class="ParentItem"  nohide="false" id="item4"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="ParentItemContentCell" >Item 4</td><td emType="m"  align="right" ><div class="ParentItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td><td emType="MenuItem" class="ParentItem"  nohide="false" id="item5"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="ParentItemContentCell" >Item 5</td><td emType="m"  align="right" ><div class="ParentItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_MainEM;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='MainEM_7r14l';td.name='MainEM';tr.appendChild(td);td.innerHTML="<div id='vxgnwqwy' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('MainEM').firstChild.firstChild.appendChild(tr);try{ob_em_MainEM = new ob_EasyMenu('MainEM',new Array('document'),false,true,0,0,{'MenuItem':{'c':'ParentItem', 'c_o':'ParentItemOver', 'c_c':'ParentItemContentCell', 'c_c_o':'ParentItemContentCellOver', 'c_lrc':'easyMenuItemLeftRoundCornerCell', 'c_lrc_o':'easyMenuItemLeftRoundCornerCellOver', 'c_rrc':'easyMenuItemRightRoundCornerCell', 'c_rrc_o':'easyMenuItemRightRoundCornerCellOver', 'c_i':'ParentItemIconCell', 'c_i_o':'ParentItemIconCellOver', 'c_m':'ParentItemSubMenuCell', 'c_m_o':'ParentItemSubMenuCellOver'},'MenuSeparator':{'c':'ParentSeparator', 'c_o':'ParentSeparatorOver', 'c_c':'ParentSeparatorContentCell', 'c_c_o':'ParentSeparatorContentCellOver', 'c_lrc':'easyMenuSeparatorLeftRoundCornerCell', 'c_lrc_o':'easyMenuSeparatorLeftRoundCornerCellOver', 'c_rrc':'easyMenuSeparatorRightRoundCornerCell', 'c_rrc_o':'easyMenuSeparatorRightRoundCornerCellOver', 'c_i':'ParentSeparatorIconCell', 'c_i_o':'ParentSeparatorIconCellOver', 'c_m':'ParentSeparatorSubMenuCell', 'c_m_o':'ParentSeparatorSubMenuCellOver'}},'Cursor','','','Always',0,false,false,'ob_em_style_1',false, '~/emstyles/icons', [''],'UniqueRenderdMenuID_276a7aff-76e9-48cd-b210-e34a45f5cf12',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->
</div>
<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<iframe id="Easymenu1__iframe" src="javascript:false;" frameBorder="0" class="menuContainerIframeUnderlay" style="display:none;"></iframe><div id="Easymenu1__underlay" class="menuContainerIframeUnderlay" style="display:none;"></div><div attachTo="item1" id="Easymenu1" class="easyMenu" style="width:140px;display:none;position:absolute;"><table class="easyMenuItemContainer"><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 1')" nohide="false" id="menuItem1"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 1</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 2')" nohide="false" id="menuItem2"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 2</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 3')" nohide="false" id="menuItem3"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 3</td><td emType="m"  align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 4')" nohide="false" id="menuItem4"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 4</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 5')" nohide="false" id="menuItem5"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 5</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_Easymenu1;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='Easymenu1_7r14l';td.name='Easymenu1';tr.appendChild(td);td.innerHTML="<div id='eplxcpay' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('Easymenu1').firstChild.firstChild.appendChild(tr);try{ob_em_Easymenu1 = new ob_EasyMenu('Easymenu1',new Array('item1'),false,true,0,-2,{'MenuItem':'default'},'Under','TopLeft','BottomLeft','MouseOver',0,false,false,'ob_em_style_1',true, '~/emstyles/icons', [''],'UniqueRenderdMenuID_c8d93800-972d-4e9a-9b13-cc4bc7b17a0a',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->

</div>
<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<iframe id="Easymenu2__iframe" src="javascript:false;" frameBorder="0" class="menuContainerIframeUnderlay" style="display:none;"></iframe><div id="Easymenu2__underlay" class="menuContainerIframeUnderlay" style="display:none;"></div><div attachTo="item2" id="Easymenu2" class="easyMenu" style="width:140px;display:none;position:absolute;"><table class="easyMenuItemContainer"><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 2 - SubItem 1')" nohide="false" id="menuItem6"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 1</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 2 - SubItem 2')" nohide="false" id="menuItem7"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 2</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 2 - SubItem 3')" nohide="false" id="menuItem8"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 3</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_Easymenu2;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='Easymenu2_7r14l';td.name='Easymenu2';tr.appendChild(td);td.innerHTML="<div id='eplxcpay' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('Easymenu2').firstChild.firstChild.appendChild(tr);try{ob_em_Easymenu2 = new ob_EasyMenu('Easymenu2',new Array('item2'),false,true,0,-2,{'MenuItem':'default'},'Under','TopLeft','BottomLeft','MouseOver',0,false,false,'ob_em_style_1',true, '~/emstyles/icons', [''],'UniqueRenderdMenuID_f9548179-aade-4638-b3a2-4e9f01da1ba4',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->
</div>
<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<iframe id="Easymenu4__iframe" src="javascript:false;" frameBorder="0" class="menuContainerIframeUnderlay" style="display:none;"></iframe><div id="Easymenu4__underlay" class="menuContainerIframeUnderlay" style="display:none;"></div><div attachTo="item4" id="Easymenu4" class="easyMenu" style="width:140px;display:none;position:absolute;"><table class="easyMenuItemContainer"><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 4 - SubItem 1')" nohide="false" id="menuItem9"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 1</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 4 - SubItem 2')" nohide="false" id="menuItem10"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 2</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_Easymenu4;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='Easymenu4_7r14l';td.name='Easymenu4';tr.appendChild(td);td.innerHTML="<div id='eplxcpay' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('Easymenu4').firstChild.firstChild.appendChild(tr);try{ob_em_Easymenu4 = new ob_EasyMenu('Easymenu4',new Array('item4'),false,true,0,-2,{'MenuItem':'default'},'Under','TopLeft','BottomLeft','MouseOver',0,false,false,'ob_em_style_1',true, '~/emstyles/icons', [''],'UniqueRenderdMenuID_93d09e1d-bcd3-4cf0-b89c-8d24aa67f07f',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->

</div>
<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<iframe id="Easymenu5__iframe" src="javascript:false;" frameBorder="0" class="menuContainerIframeUnderlay" style="display:none;"></iframe><div id="Easymenu5__underlay" class="menuContainerIframeUnderlay" style="display:none;"></div><div attachTo="item5" id="Easymenu5" class="easyMenu" style="width:140px;display:none;position:absolute;"><table class="easyMenuItemContainer"><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 5 - SubItem 1')" nohide="false" id="menuItem11"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 1</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 5 - SubItem 2')" nohide="false" id="menuItem12"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 2</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 5 - SubItem 3')" nohide="false" id="menuItem13"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 3</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 5 - SubItem 4')" nohide="false" id="menuItem14"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 4</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 5 - SubItem 5')" nohide="false" id="menuItem15"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 5</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_Easymenu5;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='Easymenu5_7r14l';td.name='Easymenu5';tr.appendChild(td);td.innerHTML="<div id='eplxcpay' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('Easymenu5').firstChild.firstChild.appendChild(tr);try{ob_em_Easymenu5 = new ob_EasyMenu('Easymenu5',new Array('item5'),false,true,0,-2,{'MenuItem':'default'},'Under','TopLeft','BottomLeft','MouseOver',0,false,false,'ob_em_style_1',true, '~/emstyles/icons', [''],'UniqueRenderdMenuID_78233d0c-3c86-480b-b468-d6ebc14c67d6',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->
</div>
<div style="height:100%;">
<span style="display:none">&nbsp;</span>
<iframe id="Easymenu6__iframe" src="javascript:false;" frameBorder="0" class="menuContainerIframeUnderlay" style="display:none;"></iframe><div id="Easymenu6__underlay" class="menuContainerIframeUnderlay" style="display:none;"></div><div attachTo="menuItem3" id="Easymenu6" class="easyMenu" style="width:140px;display:none;position:absolute;"><table class="easyMenuItemContainer"><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 3 - SubItem 1')" nohide="false" id="menuItem31"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 1</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 3 - SubItem 2')" nohide="false" id="menuItem32"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 2</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr><tr><td emType="MenuItem" class="easyMenuItem"  OnClientClick="alert('Item 1 - SubItem 3 - SubItem 3')" nohide="false" id="menuItem33"><table id="ob_em_mc"><tr><td emType="lrc" class="easyMenuItemLeftRoundCornerCell" ></td><td emType="c" colspan="2" class="easyMenuItemContentCell" >SubItem 3</td><td emType="m" style="display:none;" align="right" ><div class="easyMenuItemSubMenuCell">&nbsp;</div></td><td emType="rrc" class="easyMenuItemRightRoundCornerCell" ></td></tr></table></td></tr></table></div><script language="javascript">var ob_em_Easymenu6;var tr=document.createElement('tr');var td=document.createElement('td');td.height='60px';td.align='center';td.id='Easymenu6_7r14l';td.name='Easymenu6';tr.appendChild(td);td.innerHTML="<div id='eplxcpay' style='padding-top:5px; padding-bottom:5px; border: 2px solid #cccccc; height: 60 px; font: 8pt verdana; background-color: #eeeeee; text-align:center;'><a href='http://www.obout.com/'>obout EasyMenu</a><br />Evaluation has expired<br /><a href='http://www.obout.com/inc/purchase.aspx'>License...</a></div>";document.getElementById('Easymenu6').firstChild.firstChild.appendChild(tr);try{ob_em_Easymenu6 = new ob_EasyMenu('Easymenu6',new Array('menuItem3'),false,true,-4,0,{'MenuItem':'default'},'Right','TopLeft','TopRight','MouseOver',0,false,false,'ob_em_style_1',true, '~/emstyles/icons', [''],'UniqueRenderdMenuID_00e54b0f-683e-487e-a3ba-1a6df95b689e',false)}catch(ex){}</script><!--   OboutInc EasyMenu Pro Trial component version 3.9.2.1   http://www.obout.com   -->

</div>

</body>
</html>



My GoodNess  Wednesday, September 09, 2009 12:00 PM

You can use google to search for other answers

Custom Search

More Threads

• Font is not displayed with underline or strikeout
• .NET Web Browser Control: How to check if there is text selected??
• Cross thread operation not valid.
• Help creating alignment buttons.
• Masked Textbox control
• Several questions concerning DGV
• Localization and the Enabled/Visible Properties (bug?)
• RichTextBox_Leave event never getting fired when the form is closed
• grid of buttons
• Slow control painting...