[Mono-winforms-list] button implmentation

Aleksey Ryabchuk ryabchuk@yahoo.com
Tue, 12 Aug 2003 01:26:07 -0700 (PDT)


Hello,

I agree that we should delegate as much work as
possible to Wine. But all button controls ( Button,
CheckBox, RadioButton) in SWF have to be ownerdrawn,
because they implement a number of properties not
supported by Win API. For example, TextAlignment can
only be left, center or right in WinAPI, while in SWF
it can be TopLeft or RightBottom etc. The same is for
Label control.

Another problem is that the patched version of Wine is
not able to draw some controls at all. CheckBox,
RadioButton and ComboBox are among them. 

Regards
Aleksey


--- Dennis Hayes <DENNISH@Raytek.com> wrote:
> 
> Just thought I'd poke my head in on this and point
> out that the Windows
> implementations usually don't actually draw
> themselves. They simply wrap up
> a win32 HWND and allow the system to draw the
> control.
> 
> This is what we should do as well. That is why we
> use Wine.
> Dennis
> 
> 
> 
> 
> -----Original Message-----
> From: Jonathan Gilbert
> [mailto:2a5gjx302@sneakemail.com] 
> Sent: Tuesday, August 12, 2003 2:41 AM
> To: mono-winforms-list@lists.ximian.com
> Subject: RE: [Mono-winforms-list] button
> implmentation
> 
> Just thought I'd poke my head in on this and point
> out that the Windows
> implementations usually don't actually draw
> themselves. They simply wrap up
> a win32 HWND and allow the system to draw the
> control.
> 
> The other thing to point out is that Microsoft codes
> in this pattern:
> 
> public event PaintEventHandler Paint;
> 
> protected void OnPaint(PaintEventArgs e)
> {
>   if (Paint != null)
>     Paint(this, e);
> }
> 
> Therefore, it is likely that a subclass would hook
> the 'Paint' event
> instead of overriding the 'OnPaint' method.
> 
> Jonathan
> 
> At 11:09 AM 11/08/2003 -0700, you wrote:
> >OK let's leave it where it is for the time being.
> >Actually I am wrong twice; the spec says OnPaint
> for Button is inherited
> >from control.
> >How can control handle OnPaint for Button?
> >Am I missing something here?
> >Anyway, there are several thousand signature errors
> for me to fix before I
> >come back to this one.
> >Dennis
> >
> >-----Original Message-----
> >From: Aleksey Ryabchuk [mailto:ryabchuk@yahoo.com] 
> >Sent: Monday, August 11, 2003 7:11 AM
> >To: mono-winforms-list@lists.ximian.com
> >Subject: Re: [Mono-winforms-list] button
> implmentation
> >
> >Hello,
> >
> >May be from technical point of view there is no
> >difference where this code is located . But it can
> be
> >wrong logically, because this code is not common
> for
> >all button controls.
> >
> >Aleksey
> >
> >--- Dennis Hayes <denisraytek@yahoo.com> wrote:
> >> Button.cs implments OnPaint.
> >> The spec says this should be in ButtonBase.cs.
> >> ButtonBase is just
> >> base.OnPaint (pevent)
> >> There is a lot of implmentation in button.cs
> >>  
> >> *
> >> It looks like just replacing the ButtonBase
> OnPaint
> >> with the Button OnPaint, and removing the OnPaint
> >> from Button.cs would be the correct option.
> >> *
> >> Can someone do this and verify that is does not
> >> break any of the test?
> >> Thanks,
> >> Dennis


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com