Cannot drag stack with controls set to empty offscreen

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by dunbarx »

I just noticed your name is "5imon"

I was making a general point. On my Mac, unless I am missing something, a windowShaped stack has no means of being moved about with the mouse. There is no titlebar with which to grab it. Decorations, for me, do not display in such a stack, and without a titlebar, no go.

I am doing something wrong, or it cannot be done. Somehow I think it isn't so much a matter of my doing something wrong as it is that I am not doing something right.

Craig
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Cannot drag stack with controls set to empty offscreen

Post by Klaus »

Hi Craig,

take Simons script, put it into the script of any card and click and drag.
Will also work in a stack WITH decorations. :D


Best

Klaus
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by dunbarx »

Klaus.

I know there are ways to do this as a kluge. Early on I posted:

Code: Select all

on mouseMove
   if the mouse is down then set the loc of this stack to the screenMouseLoc
end mouseMove
You could always require that the screenMouseLoc be near the top of the stack. Not a problem. Whatever.

I was wondering if setting the windowShape of a stack REQUIRED such a thing, whatever that thing is. And whether it was just me, that no visible decorations were displayed in a windowShaped stack.

Craig
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Cannot drag stack with controls set to empty offscreen

Post by Klaus »

Setting a windowshape removes of course the decorations without us having to do this explicitely.
So, yes "setting the windowShape of a stack REQUIRES such a thing" in any case, if you mean this kind of script with "such a thing".
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by dunbarx »

Klaus.

OK. Not just me this time. :wink:

It makes sense, I just never used a windowShaped stack. Probably useful to include a note in the dictionary, that you cannot directly move such a stack with the mouse at all.

You have to ask how to do it on the forum

Craig
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by bogs »

You mean like ths?
dictionary wrote: Important! The border and title bar of a stack are not shown if the stack's windowShape is set. This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.
It is in there...
It is in there...
Image
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Cannot drag stack with controls set to empty offscreen

Post by richmond62 »

This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.
Pretty obvious as I discovered with RunRev 2.0.1 and windowShape a while ago.
-
wheel.jpg
SparkOut
Posts: 2984
Joined: Sun Sep 23, 2007 4:58 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by SparkOut »

If I recall correctly there is some "copy me" code for this in the "bouncy" stack that is included in the samples since as long as I know ago. I think it was always a good diving in place for new starters, even if it wasn't the most basic of techniques, it introduced some concepts and was fun frivolous.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by dunbarx »

You mean like ths?
EXACTLY. I have always been way ahead of my time.

Craig
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by bogs »

dunbarx wrote: Wed Jun 24, 2020 8:39 pm
You mean like ths?
EXACTLY. I have always been way ahead of my time.
Craig
Um, which time did you mean, exactly?
I do not think "ahead of my time..." means what you think that it means...
I do not think "ahead of my time..." means what you think that it means...
Last edited by bogs on Wed Jun 24, 2020 8:46 pm, edited 1 time in total.
Image
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Cannot drag stack with controls set to empty offscreen

Post by richmond62 »

on mouseMove
if the mouse is down then set the loc of this stack to the screenMouseLoc
end mouseMove
I posted your code into the image "JF" in my "Frog" stack, an,
as long as the mouse-when-down is inwith the image the stack is draggable.
Attachments
FROG.livecode.zip
Modified stack.
(14.06 KiB) Downloaded 310 times
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by dunbarx »

Silicon, Bogs.

I mean I am not surprised that what seemed like a good idea to me was already in the literature, perhaps for centuries.

Craig
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot drag stack with controls set to empty offscreen

Post by bogs »

Bionic implants, Craig.... we really have to cure your ability to apply exponential numbers for common figures (decades, anyway) ;)
Image
Post Reply