Resize a field or group in standalone

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Kruemel
Posts: 6
Joined: Thu Jan 17, 2019 11:39 am

Resize a field or group in standalone

Post by Kruemel » Fri Feb 01, 2019 9:11 am

is there a simple solution to resize a field or group in Standanlone? Like a stack, the corseur changes at the frame and you can move with dragDrop?
something like:

Code: Select all

 set the resizable of group 1 to true 

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

Re: Resize a field or group in standalone

Post by bogs » Fri Feb 01, 2019 12:25 pm

Well, there is this thread (with theory, explanations, and an actual working sample), or you might look in the dictionary for "choose" specifically, which will give you descriptions of all the tools you can switch to, as well as links that are related.

In this case, pointer: select, move, or resize objects is the one your interested in.
Image

Kruemel
Posts: 6
Joined: Thu Jan 17, 2019 11:39 am

Re: Resize a field or group in standalone

Post by Kruemel » Fri Feb 01, 2019 10:05 pm

thanks bogs for the Info.

I have now solved it with a graphic behind the text field.
the code from grap:

Code: Select all

local lSeiteZumSchieben

on mouseMove pNewMouseH, pNewMouseV
   if the mouseH < left of me + 5 then 
      set defaultcursor to 31
      put 1 into lSeiteZumSchieben
   else if the mouseH > right of me - 5 then 
      set defaultcursor to 31
      put 3 into lSeiteZumSchieben
   else if the mouseV < top of me + 5 then 
      set defaultcursor to 30
      put 2 into lSeiteZumSchieben
   else if the mouseV > bottom of me - 5 then 
      set defaultcursor to 30
      put 4 into lSeiteZumSchieben
   end if
end mouseMove

on mouseLeave
   set the defaultcursor to arrow
   put empty into lSeiteZumSchieben
end mouseLeave

on mouseDown pButtonNumber
   if lSeiteZumSchieben is not empty then 
      repeat until the mouse is up
         put the rect of me into TNewRect
         if lSeiteZumSchieben = 1 or lSeiteZumSchieben = 3 then
            put the MouseH into item lSeiteZumSchieben of tNewRect
         end if
         if lSeiteZumSchieben = 2 or lSeiteZumSchieben = 4 then
            put the MouseV into item lSeiteZumSchieben of tNewRect
         end if
         if mouseH() > 1 and mouseH() < the width of Stack "Feldgroesse" and \
               mouseV() > 1 and mouseV() < the height of Stack "Feldgroesse" then
            set the rect of me to tNewRect
            anpassen
         end if
      end repeat
   end if
end mouseDown

on anpassen
   put the rect of me into tRect
   add 5 to item 1 of tRect
   add 5 to item 2 of tRect
   subtract 5 from item 3 of tRect
   subtract 5 from item 4 of tRect
   set the rect of field 1 to tRect
end anpassen
I have just noticed, the defaultcursor 31 + 30 do not work under Windows

Post Reply