vb6 menu editor equivalent

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mel

    vb6 menu editor equivalent

    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)
  • Mark Rae [MVP]

    #2
    Re: vb6 menu editor equivalent

    "Mel" <MLightsOut@gma il.comwrote in message
    news:bd025a7d-565f-4fd6-96bf-a816e47b3a9b@v5 6g2000hsf.googl egroups.com...
    What control do I use for a menu on a web page?

    How do I add a checkbox to an menu item?
    A broad category of Microsoft tools, languages, and frameworks for software development. Designed to support developers in building, debugging, and deploying applications across various platforms.



    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Mel

      #3
      Re: vb6 menu editor equivalent

      On Oct 15, 2:46 pm, "Mark Rae [MVP]" <m...@markNOSPA Mrae.netwrote:
      "Mel" <MLights...@gma il.comwrote in message
      >
      news:bd025a7d-565f-4fd6-96bf-a816e47b3a9b@v5 6g2000hsf.googl egroups.com...
      >
      What control do I use for a menu on a web page?
      >

      >
      How do I add a checkbox to an menu item?
      >
      A broad category of Microsoft tools, languages, and frameworks for software development. Designed to support developers in building, debugging, and deploying applications across various platforms.

      >
      --
      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 DynamicItemTemp late 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?

      Comment

      • Mark Rae [MVP]

        #4
        Re: vb6 menu editor equivalent

        "Mel" <MLightsOut@gma il.comwrote in message
        news:2f7ef9d6-bc29-496b-a6d9-6bc9575671a7@k1 3g2000hse.googl egroups.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 DynamicItemTemp late 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


        Comment

        • Mel

          #5
          Re: vb6 menu editor equivalent

          On Oct 15, 4:20 pm, "Mark Rae [MVP]" <m...@markNOSPA Mrae.netwrote:
          "Mel" <MLights...@gma il.comwrote in message
          >
          news:2f7ef9d6-bc29-496b-a6d9-6bc9575671a7@k1 3g2000hse.googl egroups.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 DynamicItemTemp late 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="Ho rizontal"
          BackColor="#B5C 7DE" DynamicHorizont alOffset="2" Font-Names="Verdana"
          Font-Size="0.8em" ForeColor="#284 E98" Height="24px"
          StaticSubMenuIn dent="10px" DynamicEnableDe faultPopOutImag e="False"
          StaticEnableDef aultPopOutImage ="False">
          <Items>
          <asp:MenuItem Text="Job" Value="Job"
          Selectable="Fal se">
          <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="Fal se">
          <asp:MenuItem Text="Preview" Value="Preview"
          ToolTip="Only Internal Employees Can View Chart On Internet"></
          asp:MenuItem>

          <asp:MenuItem Text="Publish" Value="Publish"
          ToolTip="Enable s All Users to View Chart On Internet"></asp:MenuItem>
          </asp:MenuItem>
          </Items>
          <StaticSelected Style BackColor="#507 CD1" />
          <StaticMenuItem Style HorizontalPaddi ng="5px"
          VerticalPadding ="2px" />
          <DynamicHoverSt yle BackColor="#284 E98" ForeColor="Whit e" /
          >
          <DynamicMenuSty le BackColor="#B5C 7DE" />
          <DynamicSelecte dStyle BackColor="#507 CD1" />
          <DynamicMenuIte mStyle HorizontalPaddi ng="5px"
          VerticalPadding ="2px" />
          <StaticHoverSty le BackColor="#284 E98" ForeColor="Whit e" />
          <StaticMenuStyl e HorizontalPaddi ng="5px" />
          <DynamicItemTem plate>
          <%# Eval("Text") %>
          &nbsp;<asp:Chec kBox ID="chkPreview " runat="server" />
          </DynamicItemTemp late>
          <StaticItemTemp late>
          <%# Eval("Text") %>
          </StaticItemTempl ate>
          </asp:Menu>

          Comment

          • Mark Rae [MVP]

            #6
            Re: vb6 menu editor equivalent

            "Mel" <MLightsOut@gma il.comwrote in message
            news:b7698e9e-7c35-40a2-a23e-684a88fa15b5@b1 g2000hsg.google groups.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<defi nition at
            the top of the class:

            protected Dictionary<stri ng, booldicShowHide CheckBox = new
            Dictionary<stri ng, bool>();

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

            protected void Page_Init(objec t sender, EventArgs e)
            {
            dicShowHideChec kBox.Add("Copy" , true);
            dicShowHideChec kBox.Add("New", false);
            dicShowHideChec kBox.Add("Open" , true);
            dicShowHideChec kBox.Add("Previ ew", false);
            dicShowHideChec kBox.Add("Publi sh", true);
            }

            Modify the boolean values as required.

            3) Modify the checkbox markup as follows:

            <%# Eval("Text") %>&nbsp;<asp:Ch eckBox ID="chkPreview " runat="server"
            Visible='<%# dicShowHideChec kBox[Eval("Text").To String()] %>' />


            --
            Mark Rae
            ASP.NET MVP


            Comment

            • Mel

              #7
              Re: vb6 menu editor equivalent

              On Oct 16, 7:47 am, Mel <MLights...@gma il.comwrote:
              On Oct 15, 4:20 pm, "Mark Rae [MVP]" <m...@markNOSPA Mrae.netwrote:
              >
              >
              >
              >
              >
              "Mel" <MLights...@gma il.comwrote in message
              >
              news:2f7ef9d6-bc29-496b-a6d9-6bc9575671a7@k1 3g2000hse.googl egroups.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 DynamicItemTemp late 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="Ho rizontal"
              BackColor="#B5C 7DE" DynamicHorizont alOffset="2" Font-Names="Verdana"
              Font-Size="0.8em" ForeColor="#284 E98" Height="24px"
              StaticSubMenuIn dent="10px" DynamicEnableDe faultPopOutImag e="False"
              StaticEnableDef aultPopOutImage ="False">
                          <Items>
                              <asp:MenuItem Text="Job" Value="Job"
              Selectable="Fal se">
                                  <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="Fal se">
                                  <asp:MenuItem Text="Preview" Value="Preview"
              ToolTip="Only Internal Employees Can View Chart On Internet"></
              asp:MenuItem>
              >
                                  <asp:MenuItem Text="Publish" Value="Publish"
              ToolTip="Enable s All Users to View Chart On Internet"></asp:MenuItem>
                              </asp:MenuItem>
                          </Items>
                          <StaticSelected Style BackColor="#507 CD1" />
                          <StaticMenuItem Style HorizontalPaddi ng="5px"
              VerticalPadding ="2px" />
                          <DynamicHoverSt yle BackColor="#284 E98" ForeColor="Whit e" /
              >
                          <DynamicMenuSty le BackColor="#B5C 7DE" />
                          <DynamicSelecte dStyle BackColor="#507 CD1" />
                          <DynamicMenuIte mStyle HorizontalPaddi ng="5px"
              VerticalPadding ="2px" />
                          <StaticHoverSty le BackColor="#284 E98" ForeColor="Whit e" />
                          <StaticMenuStyl e HorizontalPaddi ng="5px" />
                          <DynamicItemTem plate>
                              <%# Eval("Text") %>
                              &nbsp;<asp:Chec kBox ID="chkPreview " runat="server" />
                          </DynamicItemTemp late>
                          <StaticItemTemp late>
                              <%# Eval("Text") %>
                          </StaticItemTempl ate>
                      </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.

              Comment

              • Mark Rae [MVP]

                #8
                Re: vb6 menu editor equivalent

                "Mel" <MLightsOut@gma il.comwrote in message
                news:f75c0c7c-f4a5-4b70-9126-42ae3c53765c@m3 2g2000hsf.googl egroups.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


                Comment

                Working...