How to change height and width of field to user preference

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 change height and width of field to user preference

Post by samjith »

Hi,

How to change height and width of a field to user preference? by mousestilldown handler. etc



Thanks
Samjith
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: How to change height and width of field to user preferen

Post by bn »

Hi Samjith,

could you please describe in detail what you want.

Is it a one time change, is it a fixed change, is the user doing this "all the time" why would the user want to change etc. Is the field open for typing or is it a locked field?

All this is important to understand what you want.

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

Re: How to change height and width of field to user preferen

Post by samjith »

Hi Bernd,

I wish to creating a text editor, that can have features like "split window",etc as in vim editor
when we split the main field, then, shows 2 field with same size (size:- 1 field + 2 field = size of main field).
if we change the width of first field by the user, then the second field automatically adjust.
Is it a one time change, is it a fixed change, is the user doing this "all the time" why would the user want to change etc. Is the field open for typing or is it a locked field?
The user can change height/width of a field by mouse
The user want to change field size for better handling
The field is not locked, open for typing

I know it is very difficult to understand what i meant, because of my bad english.

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

Re: How to change height and width of field to user preferen

Post by dunbarx »

Hi.

A few ways to do this. A table field, where you adjust the tabStops to show either one column or two (or more?). A dataGrid, where you change its "native" properties in much the same manner. Or, as you first mentioned, two separate fields that can be managed as a pair, where one is shown or hidden, their widths adjusting as you wish. They can sync together if they need to scroll. This is simple to do.

Which route you take may be a matter of style, but if you told more about your requirements, one of the solutions might suddenly become the best one.

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

Re: How to change height and width of field to user preferen

Post by Klaus »

Namaste Samjith,

I think you are looking for something like this, see attachment, that may get you started.


Best

Klaus
Attachments
fields_resize1.rev.zip
(1.36 KiB) Downloaded 297 times
samjith
Posts: 85
Joined: Tue Mar 31, 2015 10:09 am

Re: How to change height and width of field to user preferen

Post by samjith »

Hi Klaus,

Thanks for the stack, really great.

I am attaching a stack, to spilt window (horizontally, vertically) and delete windows
But some bug in delete windows because i did this with the help of "rect" property

Please go through the stack,
Could you tell me how to implement this buttons inside the attached stack?

or any more way to do this?

I think, now you can understand what i really want to do.

You are great.

Thanks,
Samjith
Attachments
SPlit.zip
(1.79 KiB) Downloaded 288 times
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to change height and width of field to user preferen

Post by Klaus »

Hi samjith,

hm, your stack is completely different than mine :D
I had the impression that you want to let the user resize existing fields!

Problem is, that you are using "the selectedfield", if no field is selected/has focus
then your script will not work as exspected.

Maybe you could manage a list of IDs of the newly created field(s) and use that list
to delete one or more fields when the user clicks your "delete" button?


Best

Klaus
Post Reply