Hello,
Can we insert multiple lines at the same time with #define?
Thank you in advance
Otto
#xtranslate NEXTBTN <prompt> ACTION <uaction> => ;
nOffset += 5 + oBtn:nwidth ;;
@ ( oDlg:nHeight - 30 )/2.05, nOffset BUTTON oBtn PROMPT <prompt> OF oDlg PIXEL ACTION <uaction>
// ....
NEXTBTN "myprompt" ACTION MsgInfo( "ok" )
nOffset += 5 + oBtn:nwidth ; oBtn := TButton():New( ( oDlg:nHeight - 30 )/2.05, nOffset, "myprompt", oDlg, {|| MsgInfo( "ok" )},,,,, .F., .T., .F.,, .F.,,, .F., "oBtn", .F. )
#define NEXTBTN nOffset += 5 + oBtn:nwidth; @ ( oDlg:nHeight - 30 )/2.05, nOffset BUTTON oBtn PROMPT
NEXTBTN "MoveDn" PIXEL OF oDlg ACTION SwapRow( oBrw, .t. )
#xtranslate NEXTBTN <prompt> ACTION <uaction> => ;
nOffset += 5 + oBtn:nwidth ;;
@ ( oDlg:nHeight - 30 )/2.05, nOffset BUTTON oBtn PROMPT <prompt> SIZE NIL, 25 OF oDlg PIXEL ACTION <uaction>
#xtranslate NEXTBTN1 <prompt> ACTION <uaction> => ;
@ ( oDlg:nHeight - 30 )/2.05, nOffset BUTTON oBtn PROMPT <prompt> SIZE NIL, 25 OF oDlg PIXEL ACTION <uaction>
#include "nextbtn.ch"
NEXTBTN1 "MoveDn" ACTION SwapRow( oBrw, .t. )
NEXTBTN "MoveUp" ACTION SwapRow( oBrw, .f. )
NEXTBTN "MoveDn" ACTION SwapRow( oBrw, .t. )
#xtranslate MYBTN <prompt> ACTION <uaction> => ;
nOffSet := If( oBtn == nil, 5, nOffSet + 5 + oBtn:nWidth );;
@ oDlg:nHeight - 30, nOffset BUTTON oBtn PROMPT <prompt> SIZE 80, 25 OF oDlg PIXEL ACTION <uaction>
func test
local oDlg, nOffset, oBtn
DEFINE DIALOG oDlg SIZE 600,100 PIXEL TRUEPIXEL
MYBTN "ONE" ACTION MsgInfo( "One" )
MYBTN "TWO" ACTION MsgInfo( "Two" )
MYBTN "TEN" ACTION MsgInfo( "ten" )
ACTIVATE DIALOG oDlg CENTERED
return nil
#xtranslate NEXTBTN <prompt> ACTION <uaction> => ;
nOffSet := If( oBtn == nil, 5, nOffSet + 5 + oBtn:nWidth );;
oBtn := TButton():New( ( oDlg:nHeight - 30 )/2.05, nOffset, , oDlg, , , 30 ,,, .F., .T., .F.,, .F.,,, .F., , .F. )
#xtranslate NEXTBTN <prompt> ACTION <uAction> => ;
nOffSet := If( oBtn == nil, 5, nOffSet + 5 + oBtn:nWidth );;
oBtn := TButton():New( oDlg:nHeight - 50, nOffset, <prompt>, oDlg, ;
[\{||<uAction>\}], 80, 25,,, .F., .T., .F.,, .F.,,, .F., "oBtn", .F. )
#xtranslate NEXTBTN <prompt> ACTION <uAction> => ;
nOffSet := If( oBtn == nil, 5, nOffSet + 5 + oBtn:nWidth );;
oBtn := TButton():New( oDlg:nHeight/2.05 - 50, nOffset, <prompt>, oDlg, ;
[\{||<uAction>\}], , 25,,, .F., .T., .F.,, .F.,,, .F., "oBtn", .F. );;
oBtn:nClrPane := CLR_GREEN
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 40 guests