bigtoe
Posts: 115
|
| Posted: 12/26/2004, 3:48 AM |
|
I used the Grid Builder tool to build a grid.
The rows are not editable.
Each cell contains a Label.
For display purposes only, I would like to truncate the (Label) text in a column.
For example currently the "Shape" column contains:
None
Circle
Square
Rectangle
Triangle
Hexagon
Octagon
Pentagon
I would like each cell under the "Shape" column to be truncated to 5 characters:
None
Circl
Squar
Recta
Trian
Hexag
Octag
Penta
How do I set the property of the Label to accomplish this?
|
 |
 |
aradi
Posts: 66
|
| Posted: 12/26/2004, 11:40 AM |
|
Hi,
You can add a "before show" event custom code on the label you want to shorten :
$chars =5; // Change to the number of characters you want to display
$GridName->LabelName->SetValue($GridName->LabelName->Getvalue()." ") ;
$GridName->LabelName->SetValue(substr($GridName->LabelName->Getvalue(),0,$chars));
I hope that is what you are looking for
Aradi
|
 |
 |
bigtoe
Posts: 115
|
| Posted: 12/29/2004, 6:54 PM |
|
Thanks Aradi. I will try this out.
|
 |
 |
Damian Hupfeld
|
| Posted: 01/15/2005, 7:46 PM |
|
Very similar to Aradi's response:
Add Custom Code to Before Show on your label
global $article_author;
//Limit TXT field to first 5 characters.
$article_author->article_text->SetValue(substr($article_author->article_text->GetValue(),0,5));Use your own variables.regardsDamian Hupfeldhttp://www.nexthost.com.au/services.php"bigtoe" <bigtoe@forum.codecharge> wrote in messagenews:541d36ded057db@news.codecharge.com...>> Thanks Aradi. I will try this out.>> ---------------------------------------> Sent from YesSoftware forum> http://forums.codecharge.com/>
|
|
|
 |
|