COLOR clause in DSMSGBOX
Re: COLOR clause in DSMSGBOX
I can do this, but then all text will be the same color.
I'll send you an update.
I'll send you an update.
The eXpress train is coming - and it has more cars.
Re: COLOR clause in DSMSGBOX
Make the following change to DCDIALOG.CH:
Make the following change to _DCMSG.PRG
dcmsgbox.zip is attached
Copy _dcmsg.prg to \exp19\source\dclipx and run build19_sl1.bat to rebuild dclipx.dll
Code: Select all
#xtranslate DCMSGBOX <list,...> ;
[TITLE <cTitle>] ;
[TIMEOUT <nSeconds>] ;
[<yesno:YESNO>] ;
[TO <output>] ;
[FONT <cFont>] ;
[BUTTONS <aButtons>] ;
[CHOICE <nChoice>] ;
[HOTKEY <cHotKey>] ;
[EVAL <bEval>] ;
[ICON <nIcon>] ;
[<nr:NOAUTORESTORE>] ;
[<always:ALWAYSONTOP>] ;
[_ALWAYSONTOP <_always>];
[COLOR <nFg> [,<nBg>]] ; <<<<<<<<<<
=> ;
[<output> := ] ;
DC_MsgBox(,,{<list>},<cTitle>,,<nSeconds>,<.yesno.>,<nChoice>, ;
<aButtons>,,,<cHotKey>,<cFont>,<bEval>,<nIcon>,<.nr.>, ;
<.always.>[.OR.<_always>], ;
[{<nFg>,<nBg>}] ) <<<<<<<<<<<<
Code: Select all
FUNCTION dc_msgbox ( nRow, nCol, aMessage, cTitle, lWait, nSeconds, lYesNo,;
nChoice, aItems, aMenuId, cMenuName, cHotKey, cFont, ;
bEval, nIcon, lNoRestore, lAlwaysOnTop, ;
aColor ) <<<<<<<<
FOR i := 1 TO LEN(aMessage)
@ nLine, 1 DCSAY Pad(aMessage[i],nWidth) FONT cFont SIZE 0
IF Valtype(aColor) == 'A' <<<<<<<<<<<
ATail(GetList)[aGETLIST_COLOR] := aColor <<<<<<<<<<<
ENDIF <<<<<<<<<<<
nLine++
NEXT
Copy _dcmsg.prg to \exp19\source\dclipx and run build19_sl1.bat to rebuild dclipx.dll
- Attachments
-
- dcmsgbox.zip
- (45.8 KiB) Downloaded 976 times
The eXpress train is coming - and it has more cars.