Page 1 of 1

[SOLVED] Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 9:30 pm
by karmacomposer
I put a scale factor of .5 and now I can bring all the items I need in, but when I try to drag and drop any button (like for submit or clear), they do not drag and drop - they just disappear.

Is there a listing of all controls in a stack? Where is it?

Has anyone encountered this? How do I make it work? If I put the scale factor back to 1, it is enormous and goes off the screen so I cannot move the card around.

Thanks.

Mike

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 9:32 pm
by karmacomposer
I was able to scale to 1, drag and drop said buttons and then scale back down to .5 to move it - but that's a tedious way to design the form? I have tons of stuff to add.

*** Correction - I cannot drag and drop a rectangle or other stuff now. Even scaled up now anything I try to drag and drop (controls) don't stick.

Yeah. I need some kind of a history or listing so I know what controls are actually in the card - I may have twenty buttons and ten rectangles.

Any way to drag and drop while scaled down?

Thanks.

Mike

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 9:54 pm
by Klaus
Hi Mike,

yep, drag'n'drop does not work in scaled stacks but a doubleclick on the tool in the tool palette does in fact work!

Best

Klaus

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 9:59 pm
by dunbarx
Hi.

If you have a stack with scale factor set to "1", and drag a button from the tool palette, it will drop where you leave it.

But if you do that with a smaller (or larger) scaleFactor, it will not. LC does not seem to take this property into account when dragging controls from outside, at least in terms of the visual location of the dragged object. I bet if you played around a bit, you would be able to figure out what the engine is up to.

Craig Newman

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 10:00 pm
by dunbarx
@ Mike.

It does work, it just does not track the visual location of the drop point. The control is on the card; the question is where.

Craig

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 10:06 pm
by Klaus
And/or add this script to your stack or card, so you can drag the window around freely while working on it:

Code: Select all

local maydrag

on mouseDown
  put mouseH() & "," & mouseV() into maydrag
end mouseDown

on mouseMove
  if maydrag is not empty then
    set the topLeft of this stack to item 1 of the screenMouseLoc - item 1 of maydrag,item 2 of the screenMouseLoc - item 2 of maydrag
  end if
end mouseMove

on mouseUp
  put empty into maydrag
end mouseUp

on mouserelease
  mouseup
end mouserelease
Comment it out when you are done with editing.

Re: Using scale factor, I cannot drag and drop items

Posted: Tue Jul 10, 2018 10:29 pm
by karmacomposer
Nice one Klaus.

That really helps and i'll try the double click method.

In the meantime, copying and pasting is working a treat.

Mike

Re: [SOLVED] Using scale factor, I cannot drag and drop items

Posted: Thu Jul 12, 2018 9:47 pm
by quailcreek
Interesting... I just posted a bug report on this. If the scale factor is higher than 1.8 the object is not added to the stack.

https://quality.livecode.com/show_bug.cgi?id=21416