btnbmp on buttonbar

btnbmp on buttonbar

Postby Silvio.Falconi » Tue May 03, 2016 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby Antonio Linares » Tue May 03, 2016 7:47 am

Silvio,

Please review fwh\samples\fivedbu.prg buttonbars
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Tue May 03, 2016 7:57 am

go
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Tue May 03, 2016 8:51 am

Antonio,

Image


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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby Silvio.Falconi » 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


Image



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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby nageswaragunupudi » Tue May 03, 2016 6:11 pm

With this code, I am getting the menu correctly.
Code: Select all  Expand view  RUN
  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()
 


Image

Can you post your code creating two buttonbars?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Tue May 03, 2016 7: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

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

AEval( ::oBar1: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








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

AEval( ::oBar2: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




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

AEval( ::oBar3: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby nageswaragunupudi » Wed May 04, 2016 3:44 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Wed May 04, 2016 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Mon May 16, 2016 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby nageswaragunupudi » Tue May 17, 2016 4:29 am

Please let me know the FWH version you are using
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Wed May 18, 2016 7:29 am

March 2016
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp on buttonbar

Postby nageswaragunupudi » Wed May 18, 2016 8:08 am

Please make these changes in btnbmp.prg (FWH 16.03)

Line 834 : Existing
Code: Select all  Expand view  RUN
  local oWnd

Change As:
Code: Select all  Expand view  RUN
  local oWnd, nBarTop := 0


Line 866: Existing
Code: Select all  Expand view  RUN
                    oWnd := ::oWnd:oWnd

Change As:
Code: Select all  Expand view  RUN
                    oWnd := ::oWnd:oWnd; nBarTop  := ::oWnd:nTop
 


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

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: btnbmp on buttonbar

Postby Silvio.Falconi » Wed May 18, 2016 8:21 am

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 8 guests