Re: Databinding panel.Height

"Hewitt, Simon C. (Contractor)" <[email protected]> Fri, 19 Oct 2007 05:37:16 +0100
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <CF362B9DFA7D2544934516DFA1459AEC01FD7394@BP1XEUEX709-C.bp1.ad.bp.com>
I'm confused now.
The DataBindings code indicates you want to set Height and width of
'this' (MyPanel) to those of 'psm' which I presume is the containing
form.
But that would just achieve the same as full docking anyway?

The other thing is that I think you are correct and Height and Width
might not support databinding themselves because they are components of
the Size property which does support data binding (ie there is a
SizeChanged event)

Cheers
Simon

-----Original Message-----
From: Discussion relating to the specifics of the C# and Managed C++
languages [mailto:[email protected]] On Behalf Of Alan
Baljeu
Sent: 18 October 2007 15:17
To: [email protected]
Subject: Re: [DOTNET-CX] Databinding panel.Height

For a minute, I thought "That explains it!".  But it doesn't :-{ The
sequence is 1. I resize the form 2. The form resizes the docked panel.
3. The Databinding doesn't trigger, and psm.Height doesn't get assigned.

You are right that the converse action would not work on a docked
control.

Alan

> -----Original Message-----
> Alan
>
> It probably because you are using full docking - so your panel will=20
> resize to the form's size regardless of its own Height and Width=20
> settings.
>
> Cheers
> Simon
>
> -----Original Message-----
> On Behalf Of Alan Baljeu
>
> I created a Mypanel object and docked it full to a form.
> Within class Mypanel the following code is called before the form is=20
> shown.
>
>       this.DataBindings.Add("Height", psm, "Height");
>       this.DataBindings.Add("Width", psm, "Width");
>
> Shouldn't this result in psm.Height property changing whenever I=20
> resize the form by dragging with my mouse?  It doesn't, and I have no=20
> idea what's at fault.  Maybe these properties don't support=20
> databinding events?

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com