[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]ChecBox & DrawCheckBox

From: Bernardi Mario Luca
Subject: Re: [DotGNU]ChecBox & DrawCheckBox
Date: 19 Jun 2003 21:59:51 +0200

On Thu, 2003-06-19 at 14:01, Rhys Weatherley wrote: 
> On Thursday 19 June 2003 09:11 pm, Bernardi Mario Luca wrote:

> I think you'll find that all of the states can be decomposed into the given 
> button states.  e.g. popup without mouse entered is the same as flat, popup 
> with mouse entered is the same as non-flat, etc.  For our purposes, "System" 
> and "Standard" will be the same.  i.e. you need to combine the FlatStyle with 
> the current enter/press states to determine the final draw style.

This actually is not fully true. In .NET i've used DrawCheckBox with all
possible ButtonState combination(16 for 4 bits) and , even on .NET ,
some behaviour that checkbox class has aren't reproducible with
DrawCheckBox. For example Flat and Popup have borders of different
colors. CheckBox Flat use KownColor.LightGray as checkbox background
when mouse enters control area while Popup adds a 3d shadow only when
mouse is entered leaving 2d only on MouseLeave event. I agree that i can
"simulate" almost all the states of checkbox composing ButtonState flags
in a reasonable way but the resulting appearance will be slightly
different from the .NET one.
If you think it's okey i'll finish it this way and send the .cs to you
or gopal.
> I tested it here on both Xsharp (running under KDE) and .NET, and I see the 
> following on both:
> 1. OnMouseEnter when the mouse enters a button control.
> 2. OnMouseDown when the mouse button is clicked.
> 3. OnMouseUp when the mouse button is released.
> 4. OnMouseLeave when the mouse leaves the button control.
> Seems consistent to me.  What window managers are you two using?

I also thought that this should be the right behaviour. But i'm getting 
strange ones:

With twm it's all as it should be. Only entering in and leaving from the
control area raise MouseEnter and MouseLeave events.

With fluxbox is very strange. Right and third button(and wheel) give
correct behaviour while the left button when pushed raise also
MouseEnter and MouseLeave.

With KDE i got MouseEnter and MouseLeave events whathever button i

I'm getting a fresh cvs head to check with it to exclude that i've
messed up something withouth remembering.

Best regards,
Bernardi Mario Luca <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]