It is currently Thu Nov 26, 2020 7:48 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Done] Right-clicks
PostPosted: Mon Sep 23, 2019 9:19 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 589
There appear to be numerous problems with right-clicks.

Ctrl + Left-click does not work as a right-click in any of the gadgets in the example except the TreeGadget and ImageGadget.

Right-clicking the ScintillaGadget also fires a right-click event for the Window.

Code:
Enumeration
  #Canvas : #Container
  #OpenGL : #Tree
  #Image : #Scintilla
EndEnumeration

If OpenWindow(0, 0, 0, 640, 480, "Right-click", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
 
  Define img = CreateImage(#PB_Any, 200, 200, 32, RGB(0, 0, 255))
 
  CanvasGadget(#Canvas, 10, 10, 200, 200)
  ContainerGadget(#Container, 220, 10, 200, 200, #PB_Container_Single)
  OpenGLGadget(#OpenGL, 0, 0, 200, 200)
  CloseGadgetList()
  TreeGadget(#Tree, 10, 220, 200, 200)
  ImageGadget(#Image, 220, 220, 200, 200, ImageID(img))
  ScintillaGadget(#Scintilla, 430, 10, 200, 200, 0)
 
  Repeat
    Event = WaitWindowEvent()
   
    Select Event
       
      Case #PB_Event_RightClick
        If EventWindow() = 0
          Debug "Right-click on Window"
        EndIf
      Case #PB_Event_Gadget
        Select EventType()
          Case #PB_EventType_RightButtonDown
            Select EventGadget()
              Case #Canvas : Debug "Right-down on CanvasGadget"
              Case #OpenGL : Debug "Right-down on OpenGLGadget"
            EndSelect
          Case #PB_EventType_RightButtonUp
            Select EventGadget()
              Case #Canvas : Debug "Right-up on CanvasGadget"
              Case #OpenGL : Debug "Right-up on OpenGLGadget"
            EndSelect
          Case #PB_EventType_RightClick
            Select EventGadget()
              Case #Canvas : Debug "Right-click on CanvasGadget"
              Case #OpenGL : Debug "Right-click on OpenGLGadget"
              Case #Tree : Debug "Right-click on TreeGadget"
              Case #Image : Debug "Right-click on ImageGadget"
              Case #Scintilla : Debug "Right-click on ScintillaGadget"
            EndSelect
          Case #PB_EventType_RightDoubleClick
            Select EventGadget()
              Case #Canvas : Debug "Right double-click on CanvasGadget"
              Case #OpenGL : Debug "Right double-click on OpenGLGadget"
              Case #Tree : Debug "Right double-click on TreeGadget"
              Case #Image : Debug "Right double-click on ImageGadget"
            EndSelect
        EndSelect
    EndSelect
   
  Until Event = #PB_Event_CloseWindow
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: Right-clicks
PostPosted: Mon Sep 23, 2019 12:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 30, 2013 4:39 pm
Posts: 523
TreeGadget and ImageGadget works here on OSX 13.6, PB 5.62x64.
The rest works not.


Top
 Profile  
Reply with quote  
 Post subject: Re: Right-clicks
PostPosted: Sun Feb 02, 2020 10:59 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14179
Location: France
All Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye