UnHilite/Hilite Popup Menu Option

Post Reply
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

UnHilite/Hilite Popup Menu Option

Post by Colin Haig »

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: Select all



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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: UnHilite/Hilite Popup Menu Option

Post by Antonio Linares »

Colin,

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

oWnd:oMenu:UnHilite( nItem )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: UnHilite/Hilite Popup Menu Option

Post by Colin Haig »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: UnHilite/Hilite Popup Menu Option

Post by Antonio Linares »

Colin,

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

Antonio Linares
www.fivetechsoft.com
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: UnHilite/Hilite Popup Menu Option

Post by Colin Haig »

Hi Antonio

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

Cheers

Colin
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: UnHilite/Hilite Popup Menu Option

Post by Antonio Linares »

Colin,

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

Antonio Linares
www.fivetechsoft.com
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: UnHilite/Hilite Popup Menu Option

Post by Colin Haig »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: UnHilite/Hilite Popup Menu Option

Post by Antonio Linares »

Colin,

The Class TMenu Method Hilite()/Unhilite() is basically a wrapper to this Windows API function:
http://msdn.microsoft.com/en-us/library ... s.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
Post Reply