I have a program which uses a colour requester, but it is exhibiting some rather odd behaviour.
The relevant piece of code is below:
Code: Select all
If OpenWindow(0, 100, 50, 120, 120, "Colour Requester Test")
CreateImage(1, 20, 20 ,32 ,RGB(255,255,255));blank imagefor title colour
ImageGadget(2, 50, 50, 20, 20, ImageID(1),#PB_Image_Border) ;image for title colour
Repeat
Event=WaitWindowEvent()
Select EventGadget()
Case 2
Colour = ColorRequester(subtitlecolour)
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
(Note:this only happens on alternate uses - i.e. once used after it has opened itself, the next movement of the mouse over the image will not trigger the requester opening.)
I have managed to trap the error,(when the Event_Type is either #PB_EventType_Dragstart or -1), but am curious to know what exactly is happening.
All insights gratefully received.
Kian