FormatTextAreaText
BlitzMax Forums/BlitzMax Beginners Area/FormatTextAreaText
| ||
Hi all After trying many time by changing value I can't get my text changing color FormatTextAreaText(textarea:TGadget,r,g,b,flags,pos=0,length=-1,units=1 ) what the flag for ? for what I see it change mode like Italic, bolt... I can't figure what the units is for? anyone can help out? thanks |
| ||
See if this works for you:'TextAreaText - Formating test Local win:TGadget=CreateWindow("TextArea Test",40,60,440,280,0,1) Local ta:TGadget=CreateTextArea(16,16,376,188,win,0) SetGadgetText ta,"testing textarea text formating" SetTextAreaFont ta,LoadGuiFont("tahoma",16) SetTextAreaColor ta,255,255,255,1 SetTextAreaColor ta,0,0,0,0 Const NORMAL=0,BOLD=1,ITALICS=2 'LockTextArea ta FormatTextAreaText ta,$77,$00,$00,BOLD,8,8 FormatTextAreaText ta,$44,$ff,$ff,ITALICS,17,4 FormatTextAreaText ta,$ff,$aa,$37,ITALICS+BOLD,22,9 'UnlockTextArea ta Repeat Select WaitEvent() 'Case EVENT_GADGETACTION Case EVENT_WINDOWCLOSE Exit End Select Forever |
| ||
Another example to play with: |