Hi,
I am using a Datagrid with style being Table. I have set the height of each row to 60. The row data is 3 lots of string data separated by crlf. So far so good. If I have more than one row of data to display all of the rows display fine, however, if there is only one row to display only the first lot of data is displayed ie up to the first crlf. If I then select that row, only the portion that is displayed is highlighted. As soon as there is a second row to display, the behaviour corrects itself. It is almost as if the height of a row is reduced when there is only one row to display.
I am puzzled, as I am new to Livecode I am probably doing something wrong. Any ideas?
Thanks,
Hilton.
Datagrid - Style Table - single line height reduced
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Datagrid - Style Table - single line height reduced
Hi Hilton,
1. welcome to the forum!
2. Congratulation, you chose the most complex LC object to start with, the DATAGRID
3. Datagrids of type TABLE are supposed to display ONLY ONE line of text in each cell/line!
If you want multiline text display, you need to use a datagrid of TYPE FORM, which is even more complex.
Best
Klaus
1. welcome to the forum!
2. Congratulation, you chose the most complex LC object to start with, the DATAGRID

3. Datagrids of type TABLE are supposed to display ONLY ONE line of text in each cell/line!
If you want multiline text display, you need to use a datagrid of TYPE FORM, which is even more complex.
Best
Klaus
Re: Datagrid - Style Table - single line height reduced
Thanks Klaus.
I will move on to the Datagrid - Form Style. However, it still seems strange that when there is only one line it displays partially, but as soon as there are two both display just fine.
Anyway, it will be good experience to try to conquer then Form Style.
Thanks again,
Hilton.
I will move on to the Datagrid - Form Style. However, it still seems strange that when there is only one line it displays partially, but as soon as there are two both display just fine.
Anyway, it will be good experience to try to conquer then Form Style.
Thanks again,
Hilton.
Re: Datagrid - Style Table - single line height reduced
Hi Hilton,
load the datagrid documentation PDF here and work through the examples:
http://lessons.runrev.com/m/datagrid
Datagrid FORMS are very, very complex to master, took me AGES
Hint:
Do not use CRLF internally in Livecode, replace it with CR before displaying data in Livecode.
May show unwanted results when using cross platform -> Mac/Win.
Best
Klaus
load the datagrid documentation PDF here and work through the examples:
http://lessons.runrev.com/m/datagrid
Datagrid FORMS are very, very complex to master, took me AGES

Hint:
Do not use CRLF internally in Livecode, replace it with CR before displaying data in Livecode.
May show unwanted results when using cross platform -> Mac/Win.
Best
Klaus
Re: Datagrid - Style Table - single line height reduced
Hi Klaus,
I have figured out a way around the strange behaviour and it works fine.
Thanks for the tip on crlf.
I have some apps written in a competing language and I am trying to convert/rewrite one of them in LiveCode. The reason I am trying LiveCode is that having one code base for Android and iOS has a great deal of appeal. The competitive product requires two sets of code. I will delay trying the FORM style of DataGrid as I am keen to finish the Android Version and then try it on iOS and see what, if any, issues exist.
I am going to go through the courses that become available from January 5th to make sure that I give LiveCode a fair go.
Many thanks for your help,
Hilton.
I have figured out a way around the strange behaviour and it works fine.
Thanks for the tip on crlf.
I have some apps written in a competing language and I am trying to convert/rewrite one of them in LiveCode. The reason I am trying LiveCode is that having one code base for Android and iOS has a great deal of appeal. The competitive product requires two sets of code. I will delay trying the FORM style of DataGrid as I am keen to finish the Android Version and then try it on iOS and see what, if any, issues exist.
I am going to go through the courses that become available from January 5th to make sure that I give LiveCode a fair go.
Many thanks for your help,
Hilton.