簡體   English   中英

rad菜單,檢查項目文本是否存在

[英]rad menu , check if item text exists

使用telerik和radmenu,您知道如何通過文本檢查項目是否存在

我的菜單包含文本“ menu1”

如果我使用menu.FindItemByText("menu1").Enabled = False則將禁用該按鈕

如果我使用menu.FindItemByText("menuTEST").Enabled = False那么我將收到一個異常,因為此按鈕不存在。

如何停止錯誤?

我在下面嘗試了這個但是它說它不能返回booloen

If menu.FindItemByText("menuTEST") then

'do this

End If

嘗試這個:

If Not(menu.FindItemByText("menuTEST") Is Nothing) then

    'do this

End If

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM