Topic: Operators, tGrid and a Label
I'm using label to display a value from tGrid
Form1.label4.Caption := Form1.TableGrid1.Cells[0,Form1.TableGrid1.SelectedRow];
It works OK, if tGrid has a record.
If tGrid is empty, doesn't contain any record (row) then it produces "List index out of bounds (-1)" error.
onShow event.
In order to eliminate the error I tried
if form1.TableGrid1.dbItemID < 0 then Form1.label4.Visible := False else Form1.label4.Visible := True;
Tried it with dbItemID, RowCount and SelectedRow without a success?
------------------------------------------------------
On label front;
When a value doesn't fit the allocated label length, how can I get it displayed ending bit with 3 dots.
i.e.
This is a long name that doesn't fit
if I turn auto size to false it displays
This is a long name t
I like to display it as:
This is a long nam...
Happy New Year to All...................................
God... please help me become the person my dog thinks I am.