EditorGadget invisible?
Posted: Sun Oct 27, 2013 1:32 am
Hi
I have a problem with the EditorGadget: it is invisible???
Please launch the program below, then press Ctrl+A. You will then see the selection of the invisible EditorGadget.
The problem occurs when on an image. Most other gadgets do not have this problem.
Am I missing something?
Thanks!
I have a problem with the EditorGadget: it is invisible???
Please launch the program below, then press Ctrl+A. You will then see the selection of the invisible EditorGadget.
The problem occurs when on an image. Most other gadgets do not have this problem.
Am I missing something?
Code: Select all
Win=OpenWindow(#PB_Any, 0, 0, 400, 255, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Im=CreateImage(#PB_Any, 400, 255)
StartDrawing(ImageOutput(Im))
For k=0 To 255
FrontColor(RGB(k,0,k))
Line(0,k,400,1)
Next
StopDrawing()
LoadFont(9,"Courier New",18)
E=EditorGadget(#PB_Any, 8, 8, 350, 210,#PB_Editor_WordWrap)
SetGadgetColor(E,#PB_Gadget_BackColor,$FF0000)
SetGadgetColor(E,#PB_Gadget_FrontColor,$FFFFFF)
SetGadgetFont(E,FontID(9))
For a = 0 To 5
AddGadgetItem(E, a, "Line "+Str(a))
Next
SetActiveGadget(E); we put the cursor in the EditorGadget
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Repaint
StartDrawing(WindowOutput(Win))
DrawImage(ImageID(Im),0,0)
StopDrawing()
EndIf
Until Event = #PB_Event_CloseWindow