Remove Menuitem

Remove Menuitem

Postby fraxzi » Tue Apr 05, 2011 1:48 am

Dear All,

Is there way to remove a menuitem?


Kind regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Remove Menuitem

Postby Robert Frank » Tue Apr 05, 2011 6:21 am

oWND:SetMenu(AgainBuildMenu())
Robert Frank
User avatar
Robert Frank
 
Posts: 95
Joined: Fri Nov 23, 2007 4:43 am
Location: Gdynia-Poland

Re: Remove Menuitem

Postby fraxzi » Tue Apr 05, 2011 7:40 am

Robert Frank wrote:oWND:SetMenu(AgainBuildMenu())



Hi Mr. Robert,

You mean I reset again the object's menu... hmmm... sounds logical.


Kind regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Re: Remove Menuitem

Postby Robert Frank » Tue Apr 05, 2011 10:57 am

With oWND:SetMenu depends on the user right you can change menu "on-line", its easier for me to build menu again, then destroy menuitem.

...
oWND:SetMenu(AgainBuildMenu())
...


Function AgainBuildMenu()
Local oMENU

MENU o MENU 2007
....
If User_Have_Right(right_number_1)
MENUITEM .....
MENUITEM .....
EndIf
If User_Have_Right(right_number_2)
MENUITEM .....
MENUITEM .....
EndIf

ENDMENU

...
Return oMENU
Robert Frank
User avatar
Robert Frank
 
Posts: 95
Joined: Fri Nov 23, 2007 4:43 am
Location: Gdynia-Poland

Re: Remove Menuitem

Postby fraxzi » Wed Apr 06, 2011 6:06 am

Dear Mr. Enrico and Mr. Robert,

Thank you for your help. Greatly appreciated!


Kind Regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 118 guests