Subject | Re: [IBO] How to change text alignment of each column in TIB_Grid? |
---|---|
Author | coderefectory |
Post date | 2005-11-01T17:50:51Z |
I have not gtaColumns in TitleAlignment(TIB_Grid) property...actualy I
have Left, Center, Right options.
I want align to right each column title on decimal and integer
fields!That is the point!
glyphs are disappeared when you trie to do all thing in DrawTitle
event...even if you use 1/2 width of rectangle...
procedure TfrmClanovi.grdClanoviDrawTitle(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
with (Sender as TIB_Grid) do
begin
if (DataCol[ACol] = 0) then
begin
Canvas.Brush.Color := clBtnFace;
Canvas.FillRect(Rect);
Canvas.TextRect(Rect, Rect.Left, Rect.Top, 'Costumer ID');
end;
end;
end;
have Left, Center, Right options.
I want align to right each column title on decimal and integer
fields!That is the point!
glyphs are disappeared when you trie to do all thing in DrawTitle
event...even if you use 1/2 width of rectangle...
procedure TfrmClanovi.grdClanoviDrawTitle(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
with (Sender as TIB_Grid) do
begin
if (DataCol[ACol] = 0) then
begin
Canvas.Brush.Color := clBtnFace;
Canvas.FillRect(Rect);
Canvas.TextRect(Rect, Rect.Left, Rect.Top, 'Costumer ID');
end;
end;
end;
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
>
> At 03:44 PM 29/10/2005 +0000, you wrote:
> >How to change text alignment of each column in TIB_Grid?
> >Property TitleAlignment is not what I wont.I want align control for
> >each column separately, whitout lose (up & down) order sign.
>
> Assuming you are talking about the title text, the only way I know to
> control the horizontal alignment of the text column by column is to
set the
> alignment of the data column in the ib_query and then to set the grid's
> TitleAlignment property to gtaColumns. Alignment should then follow
what
> you set for the field's alignment property.
>
> > whitout lose (up & down) order sign.
>
> Did you find that setting TitleAlignment to gtaColumns caused the
ordering
> glyphs to disappear?
>
> Helen
>