MenuItem.Selectable プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As MenuItem Dim value As Boolean value = instance.Selectable instance.Selectable = value
/** @property */ public boolean get_Selectable () /** @property */ public void set_Selectable (boolean value)
メニュー項目を選択できる場合は true。それ以外の場合は false。

メニュー項目のこのプロパティが false に設定されていると、メニュー項目をクリック (選択) しても何のアクションも発生しません。ただし、このメニュー項目に子メニュー項目がある場合は、子メニュー項目を示すポップアウト イメージが表示され使用できます。

Selectable プロパティが false に設定されているメニュー項目をメニューに表示して機能させる方法のコード例を次に示します。
<%@ Page Language="C#" %> <html> <body> <form runat="server"> <h3>Menu Selectable and Enabled properties Example</h3> Note that Home, set to Selectable=false, is unselectable, but still shows all child items.<br /> Movies, set to Enabled=false, is unselectable, is greyed out, and does not show child items. <br /> <asp:menu id="NavigationMenu" staticdisplaylevels="1" staticsubmenuindent="10" orientation="Vertical" target="_blank" runat="server"> <dynamicmenustyle backcolor="LightSkyBlue" forecolor="Black" borderstyle="Solid" borderwidth="1" bordercolor="Black" /> <items> <asp:menuitem navigateurl="Home.aspx" text="Non-Selectable" tooltip="Non-Selectable" Selectable=false> <asp:menuitem navigateurl="Music.aspx" text="Music" tooltip="Music"> <asp:menuitem navigateurl="Classical.aspx" text="Classical" tooltip="Classical"/> <asp:menuitem navigateurl="Rock.aspx" text="Rock" tooltip="Rock"/> <asp:menuitem navigateurl="Jazz.aspx" text="Jazz" tooltip="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="Movies.aspx" text="Disabled" tooltip="Disabled" Enabled=false> <asp:menuitem navigateurl="Action.aspx" text="Action" tooltip="Action"/> <asp:menuitem navigateurl="Drama.aspx" text="Drama" tooltip="Drama"/> <asp:menuitem navigateurl="Musical.aspx" text="Musical" tooltip="Musical"/> </asp:menuitem> </asp:menuitem> </items> </asp:menu> </form> </body> </html>
<%@ Page Language="VB" %> <html> <body> <form runat="server"> <h3>Menu Selectable and Enabled properties Example</h3> Note that Home, set to Selectable=false, is unselectable, but still shows all child items.<br /> Movies, set to Enabled=false, is unselectable, is greyed out, and does not show child items. <br /> <asp:menu id="NavigationMenu" staticdisplaylevels="1" staticsubmenuindent="10" orientation="Vertical" target="_blank" runat="server"> <dynamicmenustyle backcolor="LightSkyBlue" forecolor="Black" borderstyle="Solid" borderwidth="1" bordercolor="Black" /> <items> <asp:menuitem navigateurl="Home.aspx" text="Non-Selectable" tooltip="Non-Selectable" Selectable=false> <asp:menuitem navigateurl="Music.aspx" text="Music" tooltip="Music"> <asp:menuitem navigateurl="Classical.aspx" text="Classical" tooltip="Classical"/> <asp:menuitem navigateurl="Rock.aspx" text="Rock" tooltip="Rock"/> <asp:menuitem navigateurl="Jazz.aspx" text="Jazz" tooltip="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="Movies.aspx" text="Disabled" tooltip="Disabled" Enabled=false> <asp:menuitem navigateurl="Action.aspx" text="Action" tooltip="Action"/> <asp:menuitem navigateurl="Drama.aspx" text="Drama" tooltip="Drama"/> <asp:menuitem navigateurl="Musical.aspx" text="Musical" tooltip="Musical"/> </asp:menuitem> </asp:menuitem> </items> </asp:menu> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMenuItem.Selectable プロパティを検索する場合は、下記のリンクをクリックしてください。

- MenuItem.Selectable プロパティのページへのリンク