How to change some of TAT?

BlitzMax Forums/BlitzMax Programming/How to change some of TAT?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

try this ozak, dont know all the falgs but 1 = bold, 2 = italic, 3 = b = i:
Global mywin:TGadget = CreateWindow("textarea test", 10, 10, 300, 300)

Global ta:TGadget = CreateTextArea(10, 10, 200, 200, mywin)
SetGadgetLayout ta, 1, 1, 1, 1

Global mybut1:Tgadget = CreateButton("Press", 10 + 200 + 5, 10, 60, 22, mywin)
SetGadgetLayout mybut1, 0, 1, 1, 0



AddHook EmitEventHook, MyHook

Repeat
	WaitEvent()
Forever
End

Function MyHook:Object(iId:Int,tData:Object,tContext:Object)

	Local Event:TEvent=TEvent(tData)
	
	Select event.id
	
	
		Case EVENT_WINDOWCLOSE
			If event.source = mywin Then End
			
		Case EVENT_GADGETACTION
			If event.source = mybut1 Then
			
				FormatTextAreaText(ta, 255, 0, 0, 1, TextAreaCursor(ta), TextAreaSelLen(ta))
			
			EndIf
	
	EndSelect

	Return tData
	
End Function