Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listbox text, string beginning with "[" bold and colored
#1
Is it possible to make text within a listbox bold and/or colored?
In the below listbox there are 2 items that begin with a square bracket ("test 1" and "test 2"), can those items be colored green and made bold including their brackets?.
The other items stay in their default style.

I think this question was asked before but I can not find the topic anymore.

Function listbox_colored
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 ListBox 0x54230101 0x200 31 14 112 73 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040301 "*" "" "" ""

str controls = "3"
str lb3
lb3=
;[ test 1 ]
;[ test 2 ]
;test 3
;test 4
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#2
MultiLine ListBox
#3
THANK YOU!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)