Can you check this out? (mac os)

Just starting out? Need help? Post your questions and find answers here.
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

Can you check this out? (mac os)

Post 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
Last edited by mestnyi on Mon Nov 06, 2017 1:34 pm, edited 4 times in total.
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: You can check this out

Post by RSBasic »

I can move the button but I can't click on button inside canvas area.
Tested on Windows 10.
Image
Image
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: You can check this out

Post 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?
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5351
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: You can check this out

Post 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
ImageThe happiness is a road...
Not a destination
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

Re: You can check this out

Post by mestnyi »

Я могу переместить кнопку
That's what was expected, thank you. Now it remains to check in mac os
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

Re: You can check this out

Post by mestnyi »

No one has makos or is it so hard to check?
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: You can check this out

Post 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.
Saboteur
Enthusiast
Enthusiast
Posts: 272
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Re: You can check this out

Post 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.
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

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

Post 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?
mark5009
User
User
Posts: 22
Joined: Sun Oct 19, 2014 10:47 pm

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

Post 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.
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

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

Post 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
Julian
Enthusiast
Enthusiast
Posts: 276
Joined: Tue May 24, 2011 1:36 pm

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

Post by Julian »

The button does not move on macOS
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

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

Post 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
DE AA EB
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

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

Post by mestnyi »

Now I understand, thank you.
To know how to install the makos on the virtual box.
and what distribution
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

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

Post by mestnyi »

I slightly changed the code on the first post. Please let me know
If can move the button.
Post Reply