I believe I have found a bug, but this time, instead of reporting it as a bug I am posting in this forum first so that everyone can check:
Code: Select all
Enumeration
#WINDOW
#EDITORGADGET
EndEnumeration
OpenWindow(#WINDOW,0,0,640,480,"Test")
t=LoadFont(1,"Arial",10,#PB_Font_HighQuality)
If t=#False : MessageRequester("Error", "Can't load Arial font.",#PB_MessageRequester_Error) : EndIf
SetGadgetFont(#PB_Default,FontID(1))
EditorGadget(#EDITORGADGET,10,10,600,400)
t=LoadFont(1000,"Arial",20,#PB_Font_HighQuality)
If t=#False : MessageRequester("Error", "Can't load Arial font.",#PB_MessageRequester_Error) : EndIf
SetGadgetFont(#EDITORGADGET,FontID(1000))
quit=#False
Repeat
event=WaitWindowEvent()
event_menu=EventMenu()
event_gadget=EventGadget()
event_type=EventType()
If event_gadget=#EDITORGADGET And event_type=#PB_EventType_Change
Debug "EditorGadget changed!"
EndIf
If event=#PB_Event_CloseWindow
quit=#True
EndIf
Until quit=#True
The:
Code: Select all
SetGadgetFont(#EDITORGADGET,FontID(1000))
Could someone verify if it is a bug?
I tested it with PureBasic 5.70 x64.
Thank you!