Page 1 of 1

Posted: Mon Feb 24, 2003 2:25 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.

This code don't work

Code: Select all

OpenWindow(0,150,150,200,200,#PB_Window_SystemMenu,"EventType Text") 
CreateGadgetList(WindowID()) 
TextGadget(1,25,15,60,15,"Name")
TextGadget(2,25,65,60,15,"Adress") 
StringGadget(3,25,30,60,20,"")
StringGadget(4,25,80,90,20,"") 
  
Repeat 
  EventID = WaitWindowEvent() 
  If EventID=#PB_EventGadget
   Select EventGadgetID()
      Case 3
        Select EventType()
        Case #PB_EventType_LeftDoubleClick
        SetGadgetText(3, "Name")
        EndSelect 
      Case 4
        If EventType()=#PB_EventType_LeftDoubleClick
        SetGadgetText(4, "Adress")
        EndIf
         
   EndSelect   
  EndIf
Until EventID = #PB_EventCloseWindow
End

Manolo

Posted: Mon Feb 24, 2003 3:11 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Seems to be a BUG in the event handler of PureBasic.
If you change your EventType to #PB_EventType_Focus it works but it acts as soon the Gadget gets the focus (one Click on it) and this is not what you want...


Have a nice day...

Franco

Posted: Mon Feb 24, 2003 5:29 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.

Tanks Franco