Greetings colleagues noble. it is possible to roll a BUTTOMBAR case a small screen does not fit all the buttons?
below is an illustration of the control I need:
#include "fivewin.ch"
function Main()
local oDlg, oBar, oBtn, oBtn2, oBtn3,oBtn4, oBrw
local nRechts := 0
USE CUSTOMER
DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL
DEFINE BUTTONBAR oBar OF oDlg SIZE 64,48 2007 GDIP
DEFINE BUTTON oBtn OF oBar ;
FILE "\fwh\bitmaps\hcsmall.bmp", "\fwh\bitmaps\users.bmp" ;
PROMPT { || If( nRechts = 0, "first", "fourth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn2 OF oBar ;
FILE "\fwh\bitmaps\pdf.bmp", "\fwh\bitmaps\magenta.bmp" ;
PROMPT { || If( nRechts = 0, "second", "fifth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn3 OF oBar ;
FILE "\fwh\bitmaps\user.bmp", "\fwh\bitmaps\cyan.bmp" ;
PROMPT { || If( nRechts = 0 , "third", "sixth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn4 OF oBar ;
FILE "\fwh\bitmaps\next.bmp", "\fwh\bitmaps\prev.bmp" ;
PROMPT { || If( nRechts = 1, "links", "rechts" ) } ;
ACTION ( iif( nRechts = 0, nRechts := 1 , nRechts := 0 ), oBar:Refresh() )
if Val( HB_ATokens( FWVERSION )[ 2 ] ) > 17.06
oBtn:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn2:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn3:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn4:bBmpNo := { || If( nRechts = 1, 2, 1 ) }
endif
@ 50,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" ;
COLUMNS "FIRST","CITY","MARRIED","AGE" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:Married:SetCheck( nil, .t. )
:bChange := { || oBar:Refresh() }
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
Best regards
Otto
James Bott wrote:I suggest searching this forum for "metro" and "tablet."
Otto wrote:Hello Silvio,
you can Change btndyn.prg.
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oDlg, oBar, oBtn, oBtn2, oBtn3,oBtn4, oBrw
local nRechts := 0
USE CUSTOMER
DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL
DEFINE BUTTONBAR oBar OF oDlg SIZE 64,48 2007 GDIP
DEFINE BUTTON oBtn OF oBar ;
FILE "\fwh\bitmaps\hcsmall.bmp", "\fwh\bitmaps\users.bmp" ;
PROMPT { || If( nRechts = 0, "first", "fourth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn2 OF oBar ;
FILE "\fwh\bitmaps\pdf.bmp", "\fwh\bitmaps\magenta.bmp" ;
PROMPT { || If( nRechts = 0, "second", "fifth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn3 OF oBar ;
FILE "\fwh\bitmaps\user.bmp", "\fwh\bitmaps\cyan.bmp" ;
PROMPT { || If( nRechts = 0 , "third", "sixth" ) } ;
ACTION If( CUSTOMER->MARRIED, MsgInfo( "MARRIED" ), MsgInfo( "SINGLE" ) )
DEFINE BUTTON oBtn4 OF oBar ;
FILE "\fwh\bitmaps\next.bmp", "\fwh\bitmaps\prev.bmp" ;
PROMPT { || If( nRechts = 1, "links", "rechts" ) } ;
ACTION ( iif( nRechts = 0, nRechts := 1 , nRechts := 0 ), oBar:Refresh() )
if Val( HB_ATokens( FWVERSION )[ 2 ] ) > 17.06
oBtn:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn2:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn3:bBmpNo := { || If( nRechts = 0, 2, 1 ) }
oBtn4:bBmpNo := { || If( nRechts = 1, 2, 1 ) }
endif
@ 50,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" ;
COLUMNS "FIRST","CITY","MARRIED","AGE" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:Married:SetCheck( nil, .t. )
:bChange := { || oBar:Refresh() }
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
Best regards
Otto
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 33 guests