Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone Know How Change a text box's Color in a Dialog box

Status
Not open for further replies.

bbhullar

Programmer
Oct 26, 2004
3
0
0
US
Is there a way to change the color of a text box in a dialog box, to bring attention to it? I tried using a "disable dlgctrl" to just turn it off, but when you put it inside of a if statment i dont think it executes correctly following the dialog box.

Ex.
start dialog box
.....dialog box
end dialog box

if strcmp ExtractedVendorID gBackEndVendorID
disable dlgctrl 0 5
endif
 
There is no way to change the color or font of the text displayed in a dialog. However, I was able to use the disable command to grey out a text string in the dialog (I think this is what you were trying to do). Below is the sample script that I used:

proc main
dialogbox 0 0 0 100 50 11 "Text Example"
text 1 5 5 90 12 "Text may be used to make" LEFT
text 2 5 20 90 12 "the function of dialogs" LEFT
text 3 5 35 90 12 "clearer." LEFT
enddialog
pause 5
disable DLGCTRL 0 1
pause 5 ; Show off the dialog text.
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc

 
yes, but i am trying to do a conditional disable of and editbox. it works if you dont place the disable command in a if-endif statment, but once you do it doesnt work.
 
Are you sure the data in your strcmp command are as expected? I would think if it works outside of an if/endif clause but not inside one that the problem is in the if command. Try adding an else statement to the if command, such as a usermsg command so you can determine if the script executed the path you think it did or not.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top