FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour btnbmp on buttonbar
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
btnbmp on buttonbar
Posted: Tue May 03, 2016 07:39 AM

can I insert a btnbmp with a menupopuo into a buttonbar ? ( to select different options)
or wish possibility ( classes) I must use

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 07:47 AM

Silvio,

Please review fwh\samples\fivedbu.prg buttonbars

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 07:57 AM

go

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 08:51 AM
Antonio,




the menu popup is over the button... but I think it must be down the button arrow
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 11:54 AM
The reason is probably because Ihave two button bars
To confirm this, I try to put the button on the top






It is still a bug of the class
because the menu be must near to the button that calls the menupop and not relative to the first bar


how I can resolve ? I need to insert the button on second bar ....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 06:11 PM
With this code, I am getting the menu correctly.
Code (fw): Select all Collapse
   DEFINE WINDOW oWnd

   DEFINE BUTTONBAR oBar OF oWnd SIZE 32, 32 _3d

   DEFINE BUTTON OF oBar
   DEFINE BUTTON OF oBar MENU testpop()

   @ oBar:nHeight, 0 BUTTONBAR oBar2 OF oWnd SIZE 1000,32 BUTTONSIZE 32, 32 3DLOOK

   DEFINE BUTTON OF oBar2
   DEFINE BUTTON OF oBar2 MENU testpop()




Can you post your code creating two buttonbars?
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Tue May 03, 2016 07:09 PM
the problem is coordinates of menu referenced of button of second buttonbar ::oBar2
on the first ::oBar1 run ok but I need it on second buttonbar

Sorry but here I made :

the first oBar is the mother od ::oBar1,::oBar2,::oBar3
on ::oBar1 and ::oBar2 there are buttons
on ::oBar3 in future a ruler

METHOD SetBar() CLASS TFivePad

LOCAL oBar, oCursor, oClp
local oPopup


MENU oPopup POPUP
MENUITEM FWString( "1.0") ACTION NIL
MENUITEM FWString( "2.0") ACTION NIL
MENUITEM FWString( "2.5") ACTION NIL
MENUITEM FWString( "3.0") ACTION NIL
SEPARATOR
MENUITEM FWString("Get Paragraph Line Spacing") ACTION ;
MsgInfo ( "Paragraph Line Spacing : " + STR(::nLineSpacing) )
ENDMENU


DEFINE CURSOR oCursor HAND

DEFINE CLIPBOARD oClp OF ::oWndMain FORMAT TEXT

DEFINE BUTTONBAR oBar OF ::oWndMain 3D SIZE 26, 84

oBar:bLClicked := { || NIL }
oBar:bRClicked := { || NIL }

@ -1, -1 BUTTONBAR ::oBar1 OF oBar 3D SIZE oBar:nWidth - 1, 29 ;
BUTTONSIZE 26, 27


here the buttons of ::oBar1

::bLClicked := { || NIL }
::bRClicked := { || NIL }

AEval( ::aControls, { |x| x:oCursor := oCursor } )

@ 26, -1 BUTTONBAR ::oBar2 OF oBar 3D SIZE oBar:nWidth - 1, 29 ;
BUTTONSIZE 26, 27


here the buttons of ::oBar2


last button


DEFINE BUTTON ::oBarLineSpacing OF ::oBar2 RESOURCE "RTFPARAGRAPH" ;
MESSAGE "Formats current or selected paragraph(s)" ;
TOOLTIP "Line Spacing" NOBORDER ;
WHEN ::WndActive() ;
MENU oPopup ACTION nil








::bLClicked := { || NIL }
::bRClicked := { || NIL }

AEval( ::aControls, { |x| x:oCursor := oCursor, ;
x:nLeft += 219, x:nRight += 219 } )


//----------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------//
// for ruler
//-----------------------------------------------------------------------------------//
@ 55, -1 BUTTONBAR ::oBar3 OF oBar 3D SIZE oBar:nWidth - 1, 29 ;
BUTTONSIZE 26, 27




::bLClicked := { || NIL }
::bRClicked := { || NIL }

AEval( ::aControls, { |x| x:oCursor := oCursor, ;
x:nLeft += 219, x:nRight += 219 } )

RETURN NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp on buttonbar
Posted: Wed May 04, 2016 03:44 AM

Fixed in FWH 16.04. Will be available in a few days

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Wed May 04, 2016 09:20 AM
nageswaragunupudi wrote:Fixed in FWH 16.04. Will be available in a few days




????????
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Mon May 16, 2016 07:05 AM

Maestros, can Know how correct it please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp on buttonbar
Posted: Tue May 17, 2016 04:29 AM

Please let me know the FWH version you are using

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Wed May 18, 2016 07:29 AM

March 2016

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: btnbmp on buttonbar
Posted: Wed May 18, 2016 08:08 AM
Please make these changes in btnbmp.prg (FWH 16.03)

Line 834 : Existing
Code (fw): Select all Collapse
   local oWnd

Change As:
Code (fw): Select all Collapse
   local oWnd, nBarTop := 0


Line 866: Existing
Code (fw): Select all Collapse
                     oWnd := ::oWnd:oWnd

Change As:
Code (fw): Select all Collapse
                     oWnd := ::oWnd:oWnd; nBarTop  := ::oWnd:nTop


Line 874: Existing
Code (fw): Select all Collapse
                  oWnd:oPopup:Activate( ::nTop + ::nHeight(), Max( ::nLeft, 1 ), oWnd, .F. )

Change As:
Code (fw): Select all Collapse
                  oWnd:oPopup:Activate( nBarTop + ::nTop + ::nHeight(), Max( ::nLeft, 1 ), oWnd, .F. )
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: btnbmp on buttonbar
Posted: Wed May 18, 2016 08:21 AM

thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion