How to adjust size of scrollbar by user interface

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
samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

How to adjust size of scrollbar by user interface

Post by samjith » Wed Nov 11, 2015 11:45 am

Hi,

How to adjust height and width of scrollbar/option menu/button/field by user interface.
is it possible to change height and width of items? by dragging

Please find the attached zip file, contains stack to move items.
but it is difficult for me to block sliding when move items and block options when moving option menu (with out right clicking)
How to block this through script?


Thanks
Samjith
Attachments
drag.zip
(887 Bytes) Downloaded 196 times

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

Re: How to adjust size of scrollbar by user interface

Post by dunbarx » Wed Nov 11, 2015 4:20 pm

Hi.

The "scrollbarWidth" is a property that might come in handy.

But when you say "adjust the height", that is odd. Scrollbars are always set to the height of the object they live in. If you want a scrollbar that is not, I think it will have to be a separate control. Certainly doable. Is this what you meant?

Craig Newman

samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: How to adjust size of scrollbar by user interface

Post by samjith » Thu Nov 12, 2015 10:41 am

Hi,

This is different than what i mean,

For example

I need to adjust the height and width of button, but i dont want to adjust the H/Width by entering values.
I want to adjust it by click and dragging its vertex in run mode.



Thanks
Samjith

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

Re: How to adjust size of scrollbar by user interface

Post by dunbarx » Thu Nov 12, 2015 3:19 pm

Ah.

On a new card, make a button. In the card script:

Code: Select all

on mouseMove
 if item 3 of the rect of btn 1 - the mouseH < 10 and item 4 of the rect of btn 1 - the mouseV < 10 and the mouse is down then set the rect of btn 1 to the topleft of btn 1 & "," & the mouseH & "," & the MouseV
end mouseMove
This what you meant?

I put the handler in the card script so you might modify it to be universal for all (or certain other) controls. Otherwise, you could just as well put this in the button script, right?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: How to adjust size of scrollbar by user interface

Post by FourthWorld » Thu Nov 12, 2015 4:22 pm

See the tool global property in the Dictionary. What you're looking for is:

choose pointer tool
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: How to adjust size of scrollbar by user interface

Post by samjith » Sat Nov 14, 2015 5:22 am

Hi Craig and Richard Gaskin,
This what you meant?
This is exactly what i meant, works fine and got the idea to work forward with more :lol:
choose pointer tool
pointer tools works, but my controls are with in groups & groups,

is there any way to use pointer tool in groups :?:

Thanks
Samjith

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

Re: How to adjust size of scrollbar by user interface

Post by dunbarx » Sun Nov 15, 2015 4:28 am

Hi.

Check out the "selectGroupedControls" property in the dictionary. Then experiment...

Craig

Post Reply