Page 1 of 2

Can you check this out? (mac os)

Posted: Mon Oct 16, 2017 2:07 pm
by mestnyi
You can test this on different operating systems?

Code: Select all

If OpenWindow(0, 0, 0, 220, 220, "Гаджет Канвас (Холст)", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  CanvasGadget(0, 10, 10, 70, 20) 
  HideGadget(0,1)
  ButtonGadget(2,10,10,70,20,"move me")
  HideGadget(0,0)
  
  Repeat
    Event = WaitWindowEvent()
    
    If Event = #PB_Event_Gadget And EventGadget() = 0 
      If EventType() = #PB_EventType_LeftButtonUp
        ResizeGadget(0,x,y,#PB_Ignore,#PB_Ignore)
        CompilerIf #PB_Compiler_OS = #PB_OS_Windows
          HideGadget(0,0)
        CompilerEndIf
      EndIf
      
      If EventType() = #PB_EventType_LeftButtonDown 
        OffsetX = GetGadgetAttribute(0, #PB_Canvas_MouseX)
        OffsetY = GetGadgetAttribute(0, #PB_Canvas_MouseY)
        CompilerIf #PB_Compiler_OS = #PB_OS_Windows
          HideGadget(0,1)
        CompilerEndIf
      EndIf
      
      If (EventType() = #PB_EventType_MouseMove And GetGadgetAttribute(0, #PB_Canvas_Buttons) & #PB_Canvas_LeftButton)
        x = WindowMouseX(0)-OffsetX
        y = WindowMouseY(0)-OffsetY
        
        ResizeGadget(2,x,y,#PB_Ignore,#PB_Ignore)
        CompilerIf #PB_Compiler_OS <> #PB_OS_Windows
          ResizeGadget(0,x,y,#PB_Ignore,#PB_Ignore)
        CompilerEndIf
      EndIf
    EndIf    
    
  Until Event = #PB_Event_CloseWindow
EndIf

Re: You can check this out

Posted: Mon Oct 16, 2017 2:35 pm
by RSBasic
I can move the button but I can't click on button inside canvas area.
Tested on Windows 10.

Re: You can check this out

Posted: Tue Oct 17, 2017 10:25 am
by Kukulkan
PB 5.45 LTS on Linux (x64, KDE NEON):

I can move the button around inside the window.

I realized that I can move it outside (eg right). I now get scrollbars and can re-locate the button but I'm no longer able to move it then. Seems you ignore the scroll position of the canvas?

Re: You can check this out

Posted: Tue Oct 17, 2017 1:42 pm
by Kwai chang caine
RSBasic wrote:I can move the button but I can't click on button inside canvas area.
Tested on Windows 10.
The same thing with W7 v5.61 X86
For can click on button, i must adding #PB_Canvas_Container

Re: You can check this out

Posted: Tue Oct 17, 2017 4:42 pm
by mestnyi
Я могу переместить кнопку
That's what was expected, thank you. Now it remains to check in mac os

Re: You can check this out

Posted: Wed Oct 18, 2017 7:35 pm
by mestnyi
No one has makos or is it so hard to check?

Re: You can check this out

Posted: Thu Oct 19, 2017 10:50 am
by #NULL
I don't have macOS, but maybe if you change the thread title from 'You can check this out' to 'Can you check this out?' or '..test this?' or something then you might get more testers. Maybe even mention macOS in the title. The current title sounds a bit like spam email or youtube link :)

with pb 5.60 (x64), Ubuntu 16.04, i get what has already been described: i can move the button if i drag above the canvas but can't drag the button itself if it has been moved outside the canvas.

Re: You can check this out

Posted: Thu Oct 19, 2017 1:35 pm
by Saboteur
In Mac OSX High Sierra.
I can move the button, and i can click the button (but don't move it).
The button can get out of the canvas, but if I add #PB_Canvas_Container, the button remain into it. I mean, it is only drawed into the canvas.

Re: Can you check this out? (mac os)

Posted: Thu Oct 19, 2017 2:44 pm
by mestnyi
I can move the button, and i can click the button (but don't move it).
I did not understand, so is it possible to move the button inside the canvas to the mac os?

Re: Can you check this out? (mac os)

Posted: Fri Oct 20, 2017 4:37 am
by mark5009
mestnyi wrote:
I can move the button, and i can click the button (but don't move it).
I did not understand, so is it possible to move the button inside the canvas to the mac os?
I'm using 5.61 under OSX 10.12.6 (Sierra). Left click in the canvas (not in or on the button) and
you can drag the button around, including off the canvas. Left click on the button fires the button
and there is no movement of the button.

HTH .. mark.

Re: Can you check this out? (mac os)

Posted: Wed Nov 01, 2017 8:13 pm
by mestnyi
I still do not understand if you can move the button on the macos?
I slightly changed the code on the first post. Please let me know

Re: Can you check this out? (mac os)

Posted: Wed Nov 01, 2017 10:20 pm
by Julian
The button does not move on macOS

Re: Can you check this out? (mac os)

Posted: Wed Nov 01, 2017 10:38 pm
by davido
@mestnyi,

I also checked on my MacBook:

The button cannot be moved.

If I increase the size of the Canvas Gadget I still cannot move the button.
Clicking on the exposed Canvas gadget makes it disappear.


My Mac system: wrote: Model Name: MacBook Pro
Model Identifier: MacBookPro12,1
Processor Name: Intel Core i7
System Version: OS X 10.10.5 (14F2511)
Kernel Version: Darwin 14.5.0

PureBasic 5.61 x64

Re: Can you check this out? (mac os)

Posted: Thu Nov 02, 2017 9:29 am
by mestnyi
Now I understand, thank you.
To know how to install the makos on the virtual box.
and what distribution

Re: Can you check this out? (mac os)

Posted: Mon Nov 06, 2017 1:36 pm
by mestnyi
I slightly changed the code on the first post. Please let me know
If can move the button.