by 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