Set Requester Position

Share your advanced PureBasic knowledge/code with the community.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Set Requester Position

Post by eddy »

Example :

Code: Select all

   GetCursorPos_(@pt.POINT)
   SetRequesterPosition(pt\X,pt\Y)
   c = ColorRequester()
Procedure :

Code: Select all

#WINDOW_Requester=255

; /////////////////////
; Set position
; /////////////////////

Procedure SetRequesterPosition(x,y)
   ;create the invisible window which defines the position of requester
   If WindowID(#WINDOW_Requester)=0       
      OpenWindow(#WINDOW_Requester,x,y,0,0,#PB_Window_BorderLess|#PB_Window_Invisible,"Temp Hidden Window",WindowID())
   EndIf 

   If WindowID(#WINDOW_Requester)        
      UseWindow(#WINDOW_Requester)
      MoveWindow(x,y)   
   EndIf 
EndProcedure 
other solutions :
- viewtopic.php?t=6680
- viewtopic.php?t=6278
Last edited by eddy on Fri Jun 27, 2003 12:39 am, edited 1 time in total.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Set Requester Position

Post by PB »

Nice tip, Eddy. :D Works well with all requesters.
Post Reply