Hello Boki,
I am using a TNextGrid component.
On dblClick on the header, when dblClick is done in between columns(like I wanted to resize the column) column resizes to 0.
I do not want the component to do anything on this action (header in between dblClick). I set the coAutoSize to False and it still shrinks to 0.
Can anything be done?
Best regards, Kristy
dblClick on the header(resize) of TNextGrid
Started by kristy, Feb 03 2009 12:36 PM
5 replies to this topic
#1
Posted 03 February 2009 - 12:36 PM
#2
Posted 03 February 2009 - 08:36 PM
Hello Kristy,
This is a standard feature, I think that there are more grids that use such method.
I hope that it helps
Best regards
This is a standard feature, I think that there are more grids that use such method.
I hope that it helps
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 04 February 2009 - 03:19 PM
My problem is that I am drawing the text on to the grid, so when I double click on the header(betwwen columns) the grid does not find any text and shrinks the column to 0. Can anything be done in this case?
Best regards, Kristy
Best regards, Kristy
#4
Posted 04 February 2009 - 05:08 PM
Hello Kristy,
Can you please send me small demo to I check it. I hope that it will help me.
Best regards
Can you please send me small demo to I check it. I hope that it will help me.
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 05 February 2009 - 03:27 PM
I am using the custom draw cell event to draw on to NextGrid:
procedure TForm1.NextGrid1CustomDrawCell(Sender: TObject; ACol,
ARow: Integer; CellRect: TRect; CellState: TCellState);
begin
NextGrid1.Canvas.Pen.Color := clBlack;
NextGrid1.Canvas.Pen.Width := 1;
if Assigned(List) and (ARow < List.Count) then
case ACol of
0 : NextGrid1.Canvas.TextOut(CellRect.Left +20, CellRect.Top +2,
User(List.Element[ARow]).PersonName;
end;
end;
I belive the column shirnks because the data is drawn in to the cells...
procedure TForm1.NextGrid1CustomDrawCell(Sender: TObject; ACol,
ARow: Integer; CellRect: TRect; CellState: TCellState);
begin
NextGrid1.Canvas.Pen.Color := clBlack;
NextGrid1.Canvas.Pen.Width := 1;
if Assigned(List) and (ARow < List.Count) then
case ACol of
0 : NextGrid1.Canvas.TextOut(CellRect.Left +20, CellRect.Top +2,
User(List.Element[ARow]).PersonName;
end;
end;
I belive the column shirnks because the data is drawn in to the cells...
#6
Posted 05 February 2009 - 09:20 PM
Hello Kristy,
Thank you for your sample code. I have problem compiling it since it ask for List object.
Can you please made small demo project and send to me again. This will really help.
Best regards
Thank you for your sample code. I have problem compiling it since it ask for List object.
Can you please made small demo project and send to me again. This will really help.
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users