Page 1 of 1

Inserting rows on the fly?

Posted: Tue Oct 29, 2013 5:28 pm
by garyth123
Please excuse me if I am not able to describe very well here what I want to be able to do in LC.

Basically imagine a scrolling list of row after row of data. Each row consists of two fields. The fields are clickable and when one of them is clicked a further row of data is displayed immediately below the row in which the field was just clicked. Ie a new row has been inserted dynamically between existing rows. Can you do this in LC?

Re: Inserting rows on the fly?

Posted: Tue Oct 29, 2013 6:16 pm
by Klaus
Hi Garyth,

yes, this can be done with a DataGrid!
But DataGrids are complex beasts, so be warned :D


Best

Klaus

Re: Inserting rows on the fly?

Posted: Tue Oct 29, 2013 6:35 pm
by Simon
I just did a test with a group of 2 column fields with

Code: Select all

on mouseUp
   copy group id 1026 to me
end mouseUp
in the group script. 1026 is another group of 2 fields placed outside and just below the main group. It works but isn't very helpful. Even if the mouseUp is elsewhere you'd still get new rows being added all the time.
I think this may be a right click situation?

Simon

Re: Inserting rows on the fly?

Posted: Tue Oct 29, 2013 6:56 pm
by dunbarx
Hi.

Are you using a table field? This may help you think about a possible solution. In a table field of two columns with some data in it, put this in the field script:

Code: Select all

on mouseUp
   put "XXX" & tab & "YYY" into dataToLoad
   put word 2 of the clickline into tLineClicked
   put return & dataToLoad after line tLineClicked of me 
end mouseUp
Or am I missing it?

Craig Newman

Re: Inserting rows on the fly?

Posted: Tue Oct 29, 2013 7:33 pm
by garyth123
No, that's good.

It's too early to say if it will be what I want to end up with, but thanks, I would never have come up with that by myself. :D
dunbarx wrote:Hi.

Are you using a table field? This may help you think about a possible solution. In a table field of two columns with some data in it, put this in the field script:

Code: Select all

on mouseUp
   put "XXX" & tab & "YYY" into dataToLoad
   put word 2 of the clickline into tLineClicked
   put return & dataToLoad after line tLineClicked of me 
end mouseUp
Or am I missing it?

Craig Newman

Re: Inserting rows on the fly?

Posted: Tue Oct 29, 2013 11:27 pm
by Klaus
Aha, "table field", OK :D

Re: Inserting rows on the fly?

Posted: Thu Oct 31, 2013 10:44 am
by garyth123
Can I just ask in a very general way one thing to do with UI?

I'm struggling to see how my very clunky looking LC stack, with its scrolling fields and so on (and I am using mobGUI where I can), can be turned into a swish, sleek 2013/14 mobile app.

Is it possible to style fields and their rows so that, for instance, they don't look like scrolling fields? That's not very helpful, I realise, in describing the effect that my client wants, but at this stage I just want some reassurance that I can get a modern look and feel to my app. Actually it doesn't have to look at all sophisticated.

Although I'd prefer to learn how to achieve the effects I want by myself I'd also be prepared to pay to get some help with this.

Can anyone supply any pointers to where I can find out more about UI and LC?

Thanks, and sorry that I can't be more definite about the effects that I want to achieve.

Re: Inserting rows on the fly?

Posted: Thu Oct 31, 2013 9:32 pm
by Simon
Hi Gary,
I get what you are asking but it's that table field I haven't been able to deconstruct.
There is rGrid http://www.tapirsoft.com/#!rgrid/mainPage but that might still not be enough to get cool looking cells.

Using a field grouped with a rectangle graphic you can get a modern looking field, but then you have to build your table field (which might actually be fun).

Simon

Re: Inserting rows on the fly?

Posted: Fri Nov 01, 2013 10:59 am
by garyth123
Simon wrote:Hi Gary,
I get what you are asking but it's that table field I haven't been able to deconstruct.
There is rGrid http://www.tapirsoft.com/#!rgrid/mainPage but that might still not be enough to get cool looking cells.

Using a field grouped with a rectangle graphic you can get a modern looking field, but then you have to build your table field (which might actually be fun).

Simon
Thanks for saying Simon. I'll check out tapirsoft. I haven't had a chance to do much with Craig's suggestion regarding table fields.

So you are suggesting a group consisting of a graphic and a field which will somehow be contained within a table field. Is that right? And it's the table field that will be able to scroll?

This leads me to wonder if it's possible to create fields on the fly so that as you loop through a list of data that you want displayed to the user the the fields are created on each iteration. Then of course I would need the behaviour I originally enquired about, clicking on one of the cells would need to display further fields in between the existing fields ie the fields below would somehow need to be 'pushed down'. I'd also need the cells to look 'discrete' ie with space between them--yes, what might be termed 'cool looking' but they can be pretty basic as well, it's the behaviour that I need to get sorted.

Re: Inserting rows on the fly?

Posted: Fri Nov 01, 2013 1:24 pm
by garyth123