DataGrid Question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
DataGrid Question
I've got a datagrid that I've created and the column labels are starting to get long. They're wasting valuable real estate. Is there anyway that I can have the column labels take up two rows or do a wrap around when I create them in the inspector? As an example, the column label is about 20 - 25 characters long and the actual data is on 5 characters long.
Also, is there a tutorial that can teach me how to code/create a datagrid by myself (without using the inspector)? Maybe this will give me more flexibility.
Thanks,
Peter
Also, is there a tutorial that can teach me how to code/create a datagrid by myself (without using the inspector)? Maybe this will give me more flexibility.
Thanks,
Peter
Re: DataGrid Question
I'd also like to know how to do this.Is there anyway that I can have the column labels take up two rows?
Here's all the DataGrid Lessons.
And don't forget to download the DataGrid User Guide.
Re: DataGrid Question
AFAIK there is no easy way to do this, but you CAN achieve it if you are painstaking and prepared to put up with static width columns - it's not something I can envisage doing "on the fly". Well, I can, sorta, but I don't really want to go there.
(I hope I can be corrected)
You simply have to "drill down" into the DG group, then
dgHeaderComponents
dgHeaderMask
dgHeader
<column name group>
HeaderLabel - remove the checkmark from "dont wrap", got to "size & position" and set the height with "fit content".
Did I say simply? I meant...um...
Then you have to adjust the height of the dgBackground graphic in the dgHeaderMask group, and the position of the dgHeaderBottomBorder.
Then you have to edit the height of the graphic "RightHighlight" in each of the column heading groups and align them all.
Then adjust the height of each containing group to fit the contents of the subgroup it contains.
Resizing a column by the drag handles will break your carefully set column width. I'm beginning to think using scripting to set this may be more reasonable...
BUT, setting dontWrap to false seems to be reset between launches, although the resized height of the table header will remain, you will have to set the dontWrap property to false again, which is reasonably easy to do by script.
(I hope I can be corrected)
You simply have to "drill down" into the DG group, then
dgHeaderComponents
dgHeaderMask
dgHeader
<column name group>
HeaderLabel - remove the checkmark from "dont wrap", got to "size & position" and set the height with "fit content".
Did I say simply? I meant...um...
Then you have to adjust the height of the dgBackground graphic in the dgHeaderMask group, and the position of the dgHeaderBottomBorder.
Then you have to edit the height of the graphic "RightHighlight" in each of the column heading groups and align them all.
Then adjust the height of each containing group to fit the contents of the subgroup it contains.
Resizing a column by the drag handles will break your carefully set column width. I'm beginning to think using scripting to set this may be more reasonable...
BUT, setting dontWrap to false seems to be reset between launches, although the resized height of the table header will remain, you will have to set the dontWrap property to false again, which is reasonably easy to do by script.
- Attachments
-
- DGHeaderTest.zip
- (4.59 KiB) Downloaded 294 times
Re: DataGrid Question
Does anyone know how to create a datagrid where some of the information in the datagrid is editable and some isn't?
Thanks,
Peter
Thanks,
Peter
Re: DataGrid Question
Do you mean, some columns are editable and others aren't?
I had the same question just recently: DataGrid Columns: not editable property
I had the same question just recently: DataGrid Columns: not editable property
Re: DataGrid Question
Does the datagrid helper really work? Do you know who is behind this (who is the Slug)?
Does it work on all platforms?
Thanks,
Peter
Does it work on all platforms?
Thanks,
Peter
Re: DataGrid Question
Slugger is one of the old time ace programmers here at RunRev.
You should download the free trial. It's pretty amazing. I've only scratched the surface with it, so I can't answer any specific questions.
It's a BIG time saver for me. I doubleclick on my DataGrid, and another couple of clicks I've got the properties for each column set just the way I want them.
DataGrids and their associated templates are some of the most complicated areas of LiveCode, especially for a novice like me. The DataGrid Helper updates the associated templates for me. Then I close it down. And, there's no added baggage when the app is deployed.
You should download the free trial. It's pretty amazing. I've only scratched the surface with it, so I can't answer any specific questions.
It's a BIG time saver for me. I doubleclick on my DataGrid, and another couple of clicks I've got the properties for each column set just the way I want them.
DataGrids and their associated templates are some of the most complicated areas of LiveCode, especially for a novice like me. The DataGrid Helper updates the associated templates for me. Then I close it down. And, there's no added baggage when the app is deployed.