Page 1 of 1
Resize a field or group in standalone
Posted: Fri Feb 01, 2019 9:11 am
by Kruemel
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
Re: Resize a field or group in standalone
Posted: Fri Feb 01, 2019 12:25 pm
by bogs
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.
Re: Resize a field or group in standalone
Posted: Fri Feb 01, 2019 10:05 pm
by Kruemel
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