473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

vb6 menu editor equivalent

Mel
What control do I use for a menu on a web page? How do I add a check
box to an menu item? I have a menu called Chart and beneath it I have
a menu item called Publish. I want to display a checked check box
when Publish is selected and an unchecked box when it's selected
again. Can anyone point me in the right direction?

(using asp.net 2.0, vb.net 2005)
Oct 15 '08 #1
7 1420
"Mel" <ML********@gmail.comwrote in message
news:bd**********************************@v56g2000 hsf.googlegroups.com...
What control do I use for a menu on a web page?
http://msdn.microsoft.com/en-us/libr...w5(VS.80).aspx
How do I add a checkbox to an menu item?
http://forums.asp.net/p/929862/1087572.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 15 '08 #2
Mel
On Oct 15, 2:46*pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"Mel" <MLights...@gmail.comwrote in message

news:bd**********************************@v56g2000 hsf.googlegroups.com...
What control do I use for a menu on a web page?

http://msdn.microsoft.com/en-us/libr...w5(VS.80).aspx
How do I add a checkbox to an menu item?

http://forums.asp.net/p/929862/1087572.aspx

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
Okay I've got the menu control. So here's a dumb question...
I have two menus with 2 items in each menu. When I add a check box
control to the DynamicItemTemplate the check boxes appear in both
menus next to every menu item. What if I only want a check box next
to one of the menu items in only one of the menus?
Oct 15 '08 #3
"Mel" <ML********@gmail.comwrote in message
news:2f**********************************@k13g2000 hse.googlegroups.com...
Okay I've got the menu control. So here's a dumb question...
I have two menus with 2 items in each menu. When I add a check box
control to the DynamicItemTemplate the check boxes appear in both
menus next to every menu item. What if I only want a check box next
to one of the menu items in only one of the menus?
Sorry, but I don't understand what the problem is.. If you want only one of
the menus to show a checkbox, then apply the checkbox style to only one of
them...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 15 '08 #4
Mel
On Oct 15, 4:20*pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"Mel" <MLights...@gmail.comwrote in message

news:2f**********************************@k13g2000 hse.googlegroups.com...
Okay I've got the menu control. *So here's a dumb question...
I have two menus with 2 items in each menu. *When I add a check box
control to the DynamicItemTemplate the check boxes appear in both
menus next to every menu item. *What if I only want a check box next
to one of the menu items in only one of the menus?

Sorry, but I don't understand what the problem is.. If you want only one of
the menus to show a checkbox, then apply the checkbox style to only one of
them...

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
How? This is my code, and it shows a check box beneath both menus
next to every menu item.

<asp:Menu ID="mnuMain" runat="server" Orientation="Horizontal"
BackColor="#B5C7DE" DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#284E98" Height="24px"
StaticSubMenuIndent="10px" DynamicEnableDefaultPopOutImage="False"
StaticEnableDefaultPopOutImage="False">
<Items>
<asp:MenuItem Text="Job" Value="Job"
Selectable="False">
<asp:MenuItem ImageUrl="~/images/menu/copy.bmp"
Text="Copy" Value="Copy" ToolTip="Copy Current Job">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/menu/new.bmp"
Text="New" Value="New" ToolTip="Create New Job">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/menu/open.bmp"
Text="Open" Value="Open" ToolTip="Open Existing Job">
</asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Chart" Value="Chart"
Selectable="False">
<asp:MenuItem Text="Preview" Value="Preview"
ToolTip="Only Internal Employees Can View Chart On Internet"></
asp:MenuItem>

<asp:MenuItem Text="Publish" Value="Publish"
ToolTip="Enables All Users to View Chart On Internet"></asp:MenuItem>
</asp:MenuItem>
</Items>
<StaticSelectedStyle BackColor="#507CD1" />
<StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#284E98" ForeColor="White" /
>
<DynamicMenuStyle BackColor="#B5C7DE" />
<DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<StaticHoverStyle BackColor="#284E98" ForeColor="White" />
<StaticMenuStyle HorizontalPadding="5px" />
<DynamicItemTemplate>
<%# Eval("Text") %>
&nbsp;<asp:CheckBox ID="chkPreview" runat="server" />
</DynamicItemTemplate>
<StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>
</asp:Menu>
Oct 16 '08 #5
"Mel" <ML********@gmail.comwrote in message
news:b7**********************************@b1g2000h sg.googlegroups.com...
>Sorry, but I don't understand what the problem is.. If you want only one
of
the menus to show a checkbox, then apply the checkbox style to only one
of
them...

How? This is my code, and it shows a check box beneath both menus
next to every menu item.
Ah - I see what you mean. I thought when you were talking about two menus
you meant you had two menu controls.

To achieve what you want isn't particularly pretty, but it isn't
particularly difficult either.

1) In the page's code-behind, add the following Dictionary<definition at
the top of the class:

protected Dictionary<string, booldicShowHideCheckBox = new
Dictionary<string, bool>();

2) Add the following code to the code-behind:

protected void Page_Init(object sender, EventArgs e)
{
dicShowHideCheckBox.Add("Copy", true);
dicShowHideCheckBox.Add("New", false);
dicShowHideCheckBox.Add("Open", true);
dicShowHideCheckBox.Add("Preview", false);
dicShowHideCheckBox.Add("Publish", true);
}

Modify the boolean values as required.

3) Modify the checkbox markup as follows:

<%# Eval("Text") %>&nbsp;<asp:CheckBox ID="chkPreview" runat="server"
Visible='<%# dicShowHideCheckBox[Eval("Text").ToString()] %>' />
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 16 '08 #6
Mel
On Oct 16, 7:47*am, Mel <MLights...@gmail.comwrote:
On Oct 15, 4:20*pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:


"Mel" <MLights...@gmail.comwrote in message
news:2f**********************************@k13g2000 hse.googlegroups.com....
Okay I've got the menu control. *So here's a dumb question...
I have two menus with 2 items in each menu. *When I add a check box
control to the DynamicItemTemplate the check boxes appear in both
menus next to every menu item. *What if I only want a check box next
to one of the menu items in only one of the menus?
Sorry, but I don't understand what the problem is.. If you want only one of
the menus to show a checkbox, then apply the checkbox style to only oneof
them...
--
Mark Rae
ASP.NET MVPhttp://www.markrae.net

How? *This is my code, and it shows a check box beneath both menus
next to every menu item.

* * * * <asp:Menu ID="mnuMain" runat="server" Orientation="Horizontal"
BackColor="#B5C7DE" DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#284E98" Height="24px"
StaticSubMenuIndent="10px" DynamicEnableDefaultPopOutImage="False"
StaticEnableDefaultPopOutImage="False">
* * * * * * <Items>
* * * * * * * * <asp:MenuItem Text="Job" Value="Job"
Selectable="False">
* * * * * * * * * * <asp:MenuItem ImageUrl="~/images/menu/copy.bmp"
Text="Copy" Value="Copy" ToolTip="Copy Current Job">
* * * * * * * * * * </asp:MenuItem>
* * * * * * * * * * <asp:MenuItem ImageUrl="~/images/menu/new.bmp"
Text="New" Value="New" ToolTip="Create New Job">
* * * * * * * * * * </asp:MenuItem>
* * * * * * * * * * <asp:MenuItem ImageUrl="~/images/menu/open.bmp"
Text="Open" Value="Open" ToolTip="Open Existing Job">
* * * * * * * * * * </asp:MenuItem>
* * * * * * * * </asp:MenuItem>
* * * * * * * * <asp:MenuItem Text="Chart" Value="Chart"
Selectable="False">
* * * * * * * * * * <asp:MenuItem Text="Preview" Value="Preview"
ToolTip="Only Internal Employees Can View Chart On Internet"></
asp:MenuItem>

* * * * * * * * * * <asp:MenuItem Text="Publish" Value="Publish"
ToolTip="Enables All Users to View Chart On Internet"></asp:MenuItem>
* * * * * * * * </asp:MenuItem>
* * * * * * </Items>
* * * * * * <StaticSelectedStyle BackColor="#507CD1" />
* * * * * * <StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
* * * * * * <DynamicHoverStyle BackColor="#284E98" ForeColor="White" /

* * * * * * <DynamicMenuStyle BackColor="#B5C7DE" />
* * * * * * <DynamicSelectedStyle BackColor="#507CD1" />
* * * * * * <DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
* * * * * * <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
* * * * * * <StaticMenuStyle HorizontalPadding="5px" />
* * * * * * <DynamicItemTemplate>
* * * * * * * * <%# Eval("Text") %>
* * * * * * * * &nbsp;<asp:CheckBox ID="chkPreview" runat="server" />
* * * * * * </DynamicItemTemplate>
* * * * * * <StaticItemTemplate>
* * * * * * * * <%# Eval("Text") %>
* * * * * * </StaticItemTemplate>
* * * * </asp:Menu>- Hide quoted text -

- Show quoted text -
I have just one menu control. It has two menus in it called "Job" and
"Chart". Beneath the "Chart" menu I only want to display a checkbox
next to the "Preview" menu item.
Oct 17 '08 #7
"Mel" <ML********@gmail.comwrote in message
news:f7**********************************@m32g2000 hsf.googlegroups.com...
I have just one menu control.
I understand that now.
Beneath the "Chart" menu I only want to display a checkbox next to the
"Preview" menu item.
I've already told you how to do that - did you try it...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 17 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dafna | last post by:
VB - Menu Editor Dialog Box - NegotiatePosition when i tried to set the NegotiatePosition property for a menu item other than a top-level menu i got the error- Only Top Level Menus can have...
1
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one...
2
by: OllieZ | last post by:
Hi all Im trying to learn wxpython by some samples and Ive come across this. After change EVT_MENU lines from EVT_MENU(self, ID_OPEN, self.OnOpen) to self.Bind(wx.EVT_MENU, self.OnOpen) It...
10
by: H.S. | last post by:
Hi, Let me begin by saying that I am not an HTML expert. The most experience I have for HTML authoring is when I made my webpages in my grad studies at my university and some on my home computer...
4
by: jesse.hartwick | last post by:
Hey group! I have a toolbar with a "DEVELOPER" menu. I have it so that it when the menu title is clicked, a pop-up form will appear if the user has not yet verified that he or she has developer...
0
by: Amiram Korach | last post by:
When you create a MDI form, you can attach a main menu to the parent and to the child. When a child form is active, its menu is merged with the parent menu. The problem is: when the forms are...
5
by: lgbjr | last post by:
Hello All, I have several Pictureboxes (linked to an AccessDB) on a VB.NET form. I would like to use a context menu to allow the user to open the picture in their default picture viewer or...
0
by: John Dann | last post by:
On a winform with a conventional Windows menu bar: I have a second level menu item under one top-level menu that I now want to move to a different top-level menu - let's say from File to Edit....
0
by: manssi | last post by:
how to make dynamic editor menu in asp.net i have made application in asp.net but i have no coding for editor menu i want the menu in following order-- forms ..subforms .....subforms
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.