FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Buttonbar 2007 button with a attached Popup menu
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: Sun Apr 11, 2010 08:15 PM

Hello otto

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

thanks...

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: Sun Apr 11, 2010 09: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




Code (fw): Select all Collapse
DEFINE BUTTON OF oBar ;
      RESOURCE "REPORT" TOP ;
      PROMPT "Report" ;
      MENU ReportMenu( oBrw ) ;
      ACTION This:ShowPopUp() ;
      MESSAGE "Print the browse contents" ;
      TOOLTIP { "Print Report", "Report" }
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: Mon Apr 12, 2010 03:01 PM

Otto...

are you using BTNBMP or RBBTN??

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: Mon Apr 12, 2010 08:17 PM
Daniel, I think it is RBBTN. Here is the ppo file:
Code (fw): Select all Collapse
oBtnBearbeiten := oFunktionen:AddButton( 5, 145, 75, 65, "Bearbeiten", {|Self|( oBtnBearbeiten:ShowPopup() )}, Upper("SPLITPOPUP"),, ".\bitmaps2\11.bmp",, .T., Upper("TOP"), oMenuBearbeiten,,,, )


Best regards,
Otto
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: Mon Apr 12, 2010 08: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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: 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

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: 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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Buttonbar 2007 button with a attached Popup menu
Posted: 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

Continue the discussion