Hi again.
Ok, I have a partial update, but still having some issues. I got round the
general problem (4 areas to drag into) by creating 4 Panel controls on my
control, and the user can drop into these (or will be able to, once I've
understood how to drop onto Panels on a custom control (there's a recent
news thread on it).
On to my problem, or maybe it's a design issue. Now I have 4 panels which
act as containers, and actually the added advantage that the designer will
be able to drop controls anywhere in each of the panels. However, if the
control's dropped into the panels need to fill them (as I'll be doing for
the current project where I need this), it seems a waste to have a panel
control whose only purpose is to hold another single control that covers it
entirely. I was just wondering if it's possible to just create the 4 Panels
at design-time... eg:-
At Design-time:
Splitter-control
Pane[0] -> Panel(part of splitter/designer) ->
Panel(user-inserted)->[Controls]
Pane[1] -> Panel(part of splitter/designer) -> User-Control
Pane[2] -> Panel(part of splitter/designer) -> User-Control
Pane[3] -> Panel(part of splitter/designer) ->[Controls]
At Run-time:
Splitter-control
Pane[0] -> Panel(user-inserted)->[Controls]
Pane[1] -> User-Control
Pane[2] -> User-Control
Pane[3] -> Panel(auto-created) ->[Controls]
As you can see, at runtime, the extraneous design-time panel is removed, and
only created at run-time if the pane doesn't contain a Fill-docked control.
Hope this makes sense, of am I digging myself into a hole here...
Yours,
Ann-Marie
[quoted text, click to view] "A Ratcliffe" <aratcliffe@archimagic.net> wrote in message
news:ehL$bOA0FHA.2884@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I'm working on a 2-way splitter for something I'm developing in C#... ok
> so the MFC version wasn't amazing, but at least we had something to work
> with. Anyway, given that it will always have 4 child panes, it should only
> ever have 4 children - not 3 or 5 (or more).
>
> I figure it would make sense to have the 4 'panes' show on the screen in
> design time, and any control/panel that was dragged into one of the four
> would fill it - thus preneting too many controls. If only 3 panes had been
> filled, there would be a warning at run-time.
>
> So basically, how is the best way to do this?
>
> I know I can write the 2-way splitter directly into code, but given my
> needs, I want it as a visual control I can work with at design-time.
>
> Yours,
>
> Ann-Marie
>
>