Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Joachim Bieler Newsgroups: comp.lang.clipper.visual-objects Subject: Re: ContextMenuItem in bBrowser Date: Thu, 23 Aug 2012 07:55:01 +0200 Lines: 35 Message-ID: References: <76b1a3d4-9052-4be3-8b80-a67badb24b96@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net q7JIfN9a/0eICuRX9uqO7Q8l1UYtgUk0BNPVYL8BdeHJXS4HHvDTL2TWQOw67irLEE Cancel-Lock: sha1:OerH3zD7QRD7DLbhro9Ytzyrdsk= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <76b1a3d4-9052-4be3-8b80-a67badb24b96@googlegroups.com> Xref: csiph.com comp.lang.clipper.visual-objects:3988 Hi Lu, you can implement the method Menu:IsItemEnabled() with the code below: method IsItemEnabled(iItemID) class Menu local lEnabled as logic local iState as dword iState := GetMenuState(self:Handle(), iItemID, MF_BYCOMMAND) if iState <> 0xffffffff .and. _And(iState, MFS_DISABLED) = 0 lEnabled := True endif return lEnabled Regards, Joachim Bieler HTML clipboard Am 21.08.2012 16:53, schrieb Lu: > Hi VO experts! > > How is it possible to check an item in a contextmenu in a bBrowser whether it is set disabled or not ? > > I tried some code like: > > self:odcbBrowser:ContextMenu:IsEnabled(IDM_mnu_ContextEdit_Context_New_ID) > self:odcbBrowser:ContextMenu:IsEnabled(IDM_mnu_ContextEdit_Context_New_ID,#MenuItemID) > > but the method "IsEnabled" is not known. It appears an error code 13 "No exported Method" > > Have you any ideas to solve the problem! Thanks in advance for any hint. > > Lu