#Define mutiline
Posted: Wed May 06, 2020 7:25 am
Hello,
Can we insert multiple lines at the same time with #define?
Thank you in advance
Otto
Can we insert multiple lines at the same time with #define?
Thank you in advance
Otto
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
Code: Select all
#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" )
Code: Select all
nOffset += 5 + oBtn:nwidth ; oBtn := TButton():New( ( oDlg:nHeight - 30 )/2.05, nOffset, "myprompt", oDlg, {|| MsgInfo( "ok" )},,,,, .F., .T., .F.,, .F.,,, .F., "oBtn", .F. )
Code: Select all
#define NEXTBTN nOffset += 5 + oBtn:nwidth; @ ( oDlg:nHeight - 30 )/2.05, nOffset BUTTON oBtn PROMPT
Code: Select all
NEXTBTN "MoveDn" PIXEL OF oDlg ACTION SwapRow( oBrw, .t. )
Code: Select all
#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>
Code: Select all
#include "nextbtn.ch"
NEXTBTN1 "MoveDn" ACTION SwapRow( oBrw, .t. )
NEXTBTN "MoveUp" ACTION SwapRow( oBrw, .f. )
NEXTBTN "MoveDn" ACTION SwapRow( oBrw, .t. )
Code: Select all
#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
Code: Select all
#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. )
Code: Select all
#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. )
Code: Select all
#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