FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour UnHilite/Hilite Popup Menu Option
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 05:04 AM
Hi All

I have a popup menu activated by a button how can you hilite/unhilite a menu option - there is
sample code for a normal menu bit not a popup


I have tried oWnd:oMenuAddClient:UnHilite(3)
Code (fw): Select all Collapse
MENU oMenuAddClient POPUP
  MENUITEM "Add New Customer" ;
      ACTION(oCode:blank(),cOldCode := space(len(oCode:code)),oCode:append(),oLbx:SelectCol(1),oLbx:Refresh(),oLbx:SetFocus())

  MENUITEM "Add New Contact" ;
      ACTION(eval(bConAdd));

  MENUITEM "Add New Site" ;
      ACTION(eval(bDelAdd))
     
ENDMENU

DEFINE BUTTON oBtn2 of oBar RESOURCE "PLUS" ;
       PROMPT 'Add' ;
       MENU oMenuAddClient ;
       TOOLTIP('Add Record')


Cheers

Colin
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 06:44 AM

Colin,

oWnd:oMenu:Hilite( nItem ) // i.e. nItem --> 2

oWnd:oMenu:UnHilite( nItem )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 07:11 AM

Hi Antonio

I tried that code - but it is a popup menu.

This is the error

Error description: Warning BASE/1004 Message not found: TMDICHILD:MENUADDCLIENT

Cheers

Colin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 11:11 AM

Colin,

Have you tried with oWnd:oPopup:Hilite( ... ) ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 12:10 PM

Hi Antonio

I had tried oWnd:oMenuAddClient:UnHilite(3) before I posted the first message.

Cheers

Colin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 12:39 PM

Colin,

So the problem is that it looks focused and you don't want it focused ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 03:00 PM

Hi Antonio

I was trying to hilite/unhilite an option depending on a on change event with xbrowse - if not possible I can
use a another button on the buttonbar to do what I want.

Cheers

Colin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: UnHilite/Hilite Popup Menu Option
Posted: Tue Jul 02, 2013 06:20 PM
Colin,

The Class TMenu Method Hilite()/Unhilite() is basically a wrapper to this Windows API function:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647986(v=vs.85).aspx

so I guess that if all parameters are properly supplied, maybe the problem is that Windows is not able to do it under those circunstances.
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion