Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / C# winforms design-time child control behaviour Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
eulogy

April 04, 2005, 02:56 PM

Hi!
I'm building a grid control which contains a grid of cell controls. Each cell is supposed to contain another control. Everything works fine except the design-time behaviour which I have two problems with. The first is to draw adornments on the cells, which are another control type contained within the grid control (sort of the same as a panel control)..

[Designer(typeof(LayoutGridDesigner))]
class LayoutGrid : Control
{
ArrayList gridCells;

...blabla...
}

[Designer(typeof(GridCellDesigner))]
class GridCell : Control
{
}

I've tried to make both the GridCellDesigner and the LayoutGridDesigner to paint a dotted line around (inside the border of) the GridCell. The gridcell won't paint anything - I expect this to be because child control don't seem to paint adornments. When trying to paint the adornments with the GridLayoutDesigner the gridcell keeps on repainting...

The second thing I want to do is to make the gridcells able to contain other controls. This works by making GridCellDesigner inherit from ParentControlDesigner instead of ControlDesigner, but as with the adornments it doesn't work when the gridcell is a child control..

Any suggestions?

 
This thread contains 1 message.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.