SWF members
"Michael S. Muegel" <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
What does everybody think about adding some key SWF.Control properties to
wx.Window? I'm thinking of the following:
// Not tested; may be logic flaws
public virtual int Top
{
get { return this.Position.Y; }
set { this.Move(this.Position.X, value, 0); }
}
public virtual int Left
{
get { return this.Position.X; }
set { this.Move(value, this.Position.Y, 0); }
}
public virtual int Right
{
get { return this.Position.X + this.Size.Width; }
set { this.Move(value - this.Size.Width, this.Position.Y, 0); }
}
public virtual int Bottom
{
get { return this.Position.Y + this.Size.Height; }
set { this.Move(this.Position.X, value - this.Size.Height, 0); }
}
public virtual int Width
{
get { return this.Size.Width; }
set { this.Size = new Size(value, this.Size.Height); }
}
public virtual int Height
{
get { return this.Size.Height; }
set { this.Size = new Size(this.Size.Width, value); }
}
These very commonly used.
I'm not sure what the stance is on adding to wx classes vs. simply emulating
all wxWidgets members.
Without looking at wxWidgets code, I would think using Window.Move/Size when
your window is visible is more efficient graphics-wise then calling
equivalent pairs of the above. And that is one reason not to provide them I
guess. But they are handy.
-Mike
--
Michael S. Muegel
Dallas, TX
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click