Hi,
I try to display the window of my custom control on the current cell area.
1.
With custom static renderer and in it''s OnDraw method I position my control with the clientRectangle parameter. It works ok, except the
height. My control''s window exceeds
the bottom position by some pixels.
?
2.Also it is resized fine with column''s
resizing but not with row''s resizing.
?
( my control has been added
to Grid.Controls collection).
Regards
Stefan
AD
Administrator
Syncfusion Team
January 7, 2004 09:05 AM UTC
Here is a sample that derives a Static cell control, and does not seem to have this problem. It sets a panel to the size of the clientrectangle. The size seems appropriate and you can size teh row heights as well.
What are you doing differertly? Does your control accept all sizes as proper bounds. Some controls (like comboboxes) cannot be set to aribitary sizes.
AD
Administrator
Syncfusion Team
January 7, 2004 09:38 AM UTC
Clay,
Really the problem isn''t the size.
I do the same.
Looking more carefully the problem is :
Adding the control to GridControl.Controls collection it
looses its settings and it displays a bold large font, instead the normal setting. This has as result to exceed
the client area (my opinion).
The same control if it belongs to Form
Controls it is displayed correctly but
ofcourse I can not show it into the
client area, only in relative position.
The control is syncfusion comboDown with a dropDown GridGontrol (Virtual).
Regards
Stefan
AD
Administrator
Syncfusion Team
January 7, 2004 09:58 AM UTC
I assign again the font in OnDraw Method and it works ( the font).
T
AD
Administrator
Syncfusion Team
January 7, 2004 10:02 AM UTC
The size continues to exceed two pixels
and the row resizing is not correct.
What did you say about comboBoxes
They don''t accept arbitrary sizes ?
What to do ?
How to change the size of the button ?
(a minimum size les than my default
row height)
AD
Administrator
Syncfusion Team
January 7, 2004 11:34 AM UTC
Does your control inherit properties (like its Font) from its parent? If so, you will have to reset these properties after the control is added to the grid''s Controls collection, as adding the control to the Controls collection parents the control to the grid (setting these inherited properties).
SW
Syed Waseem Jaffer
January 15, 2004 06:06 AM UTC
Hi all,
I also have follow the same problem. but i foud its solution in some differnet way. if u put ur .NET control in a panel and then put that panel in the Grid''s control collection then u will get rid of from this rendering problem. it will not exceed the size of the item and font will not get disturb.
Try it
>Does your control inherit properties (like its Font) from its parent? If so, you will have to reset these properties after the control is added to the grid''s Controls collection, as adding the control to the Controls collection parents the control to the grid (setting these inherited properties).
SW
Syed Waseem Jaffer
January 15, 2004 06:07 AM UTC
Hi all,
I also have faced the same problem. but i foud its solution in some differnet way. if u put ur .NET control in a panel and then put that panel in the Grid''s control collection then u will get rid of from this rendering problem. it will not exceed the size of the item and font will not get disturb.
Try it
>Does your control inherit properties (like its Font) from its parent? If so, you will have to reset these properties after the control is added to the grid''s Controls collection, as adding the control to the Controls collection parents the control to the grid (setting these inherited properties).