Buttonbar 2007 button with a attached Popup menu

Re: Buttonbar 2007 button with a attached Popup menu

Postby Daniel Garcia-Gil » Sun Apr 11, 2010 8:15 pm

Hello otto

can you post a "fake" image what do you want ??

thanks...
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Buttonbar 2007 button with a attached Popup menu

Postby Otto » Sun Apr 11, 2010 9:06 pm

Hello Daniel,
thank you for coming back to my question.
If I open the attached menu with the arrow down from the button the menu aligns correctly. If I press the button with the Action This:showPopup() the menu aligns wrong. Please see the bitmap.
Thanks in advance
Otto


Image

Code: Select all  Expand view
DEFINE BUTTON OF oBar ;
      RESOURCE "REPORT" TOP ;
      PROMPT "Report" ;
      MENU ReportMenu( oBrw ) ;
      ACTION This:ShowPopUp() ;
      MESSAGE "Print the browse contents" ;
      TOOLTIP { "Print Report", "Report" }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: Buttonbar 2007 button with a attached Popup menu

Postby Daniel Garcia-Gil » Mon Apr 12, 2010 3:01 pm

Otto...

are you using BTNBMP or RBBTN??
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Buttonbar 2007 button with a attached Popup menu

Postby Otto » Mon Apr 12, 2010 8:17 pm

Daniel, I think it is RBBTN. Here is the ppo file:
Code: Select all  Expand view
oBtnBearbeiten := oFunktionen:AddButton( 5, 145, 75, 65, "Bearbeiten", {|Self|( oBtnBearbeiten:ShowPopup() )}, Upper("SPLITPOPUP"),, ".\bitmaps2\11.bmp",, .T., Upper("TOP"), oMenuBearbeiten,,,, )


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: Buttonbar 2007 button with a attached Popup menu

Postby Daniel Garcia-Gil » Mon Apr 12, 2010 8:38 pm

Otto..

you dont need call ShowPopup()

use MENU oMenu in command ADD BUTTON
sample

@ 3,5 ADD BUTTON oBtn PROMPT "Change" BITMAP "mybitmap" GROUP oGr MENU oMenu ;
SPLITPOPUP ROUND SIZE 65,75 TOP
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Buttonbar 2007 button with a attached Popup menu

Postby Otto » Mon Apr 12, 2010 10:14 pm

Daniel,
But I want to open the menu also with a click on the button not only on the arrow.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: Buttonbar 2007 button with a attached Popup menu

Postby Daniel Garcia-Gil » Mon Apr 12, 2010 10:17 pm

Otto...


if you dont define ACTION the default action will be ShowPopup()

see

@ 3,5 ADD BUTTON oBtn PROMPT "Change" BITMAP "mybitmap" GROUP oGr MENU oMenu ;
SPLITPOPUP ROUND SIZE 65,75 TOP

i dont defined action in this button, when you push the button the popup menu is displayed
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Buttonbar 2007 button with a attached Popup menu

Postby Otto » Tue Apr 13, 2010 10:19 am

Hello Daniel,
thank you so much. Now all is working perfectly.
I didn’t know about that.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], jmartial, Marc Venken and 109 guests