Page 1 of 1
Flexiable Row heights in datagrid
Posted: Sun Feb 13, 2011 8:16 am
by lumpo
I am populating a DG from a number of custom props that contains 2 columns and 7 rows of text.For each line the amount of text is variable and so sometimes is within the space of the form field and others just disappears as it hits the field's lower limit (ie too much text).
IS is possible to have the rows dynamically adjust to the content of the field in the form? I am not using a fixed line height anywhere.
TIA
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 5:25 pm
by trevordevore
Data Grid forms support variable height rows. Tables do not.
See this lesson for information on creating a variable row height data grid form.
http://lessons.runrev.com/spaces/lesson ... e-Heights-
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 8:27 pm
by lumpo
Thanks Trevor - figured it out and all's well... Sort of.
The rows all resize dynamically as data comes in (from a custom prop triggered from an rTree control) but I've lost the ability for a row to be highlighted. Clicking on the row allows me to extract data from the row ok. Have used DGH, intuition, human sacrifice, threats, promises and tears, but can't get the hilite ... Any suggestions?
Thanks
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 8:48 pm
by trevordevore
The data grid will change the color of a graphic named "Background" in your row template (see notes in setProp dgHilite). Have you included a graphic with that name? Is it visible and opaque?
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 9:01 pm
by Zryip TheSlug
Plus, do you have a mouseDown handler in the datagrid group script?
If yes don't forget to pass the dgMouseDown message to the datagrid engine:
Code: Select all
on mouseDown pWhichButton
doMyStuff
dgMouseDown pWhichButton
end mouseDown
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 10:05 pm
by lumpo
Zryip TheSlug wrote:Plus, do you have a mouseDown handler in the datagrid group script?
If yes don't forget to pass the dgMouseDown message to the datagrid engine:
Code: Select all
on mouseDown pWhichButton
doMyStuff
dgMouseDown pWhichButton
end mouseDown
Zryip - thanks. an embarrassing forgetting to put the pass MouseDown in ... all's fine. Thanks for all the help guys
Re: Flexiable Row heights in datagrid
Posted: Thu Feb 17, 2011 11:37 pm
by Zryip TheSlug
You're welcome
