Hi Dmitry,
o.k. it was a basic misunderstanding on my side.
First, what does happen - and what I did not expect - was:
I pressed the radio button and moved the mouse away.
At the moment of pressing the button the colors change and they do not change back,
they change back when I activated another window e.g..
Because the concept of "focus" is not of much sense for radio buttons, it did not occur to me,
that this might be fine for a general button, where focussing and pressing are to kind of beasts.
I misunderstood the high lighting as a means for showing the moment of activation, not of beeing focussed.
Using the arrow keys show the expected behaviour (because the remove the focus, of course)
So I have to admit a misunderstanding of a slightly confusing feature, probably in a lot of GUIs.
I succeeded in getting my coloured radio buttons , nevertheless, as I showed in the onPaint code I posted the other day.
That couldn't have been done in another way anyhow.
Thank you for your help
Mike
P.S.: Still no success with your PDL-Prima Conversion; I should very much appreciate if you could try the compilation on a Windows system some time.
----- Original Message -----
From: "Dmitry Karasik" <dmitry_at_karasik.eu.org>
To: <prima_at_prima.eu.org>
Sent: Saturday, February 15, 2003 12:16 PM
Subject: Re: Minor Redraw Bug
Hi Michael!
On 14 Feb 03 at 20:19, "Michael" (Michael Peuser h) wrote:
on_leave deals with focus; on_mouseleave deals with mouse.
These two are completely different events.
I somehow don't understand what is the problem - Radio uses
hiliteBackColor when it is focused, backColor otherwise. This
scheme has nothing to do with pressed/un-pressed state.
On my systems, with your modified code, radio button is gray
when it is focused ( not the marquee around the text ) and is
red when it is not. That is o.k. - but probably you have something else
in mind?
/Dmitry
Michael> Hi Dmitry, I could reproduce it with a modified Perl example
Michael> buttons.pl Line 130: $w-> insert( "Radio" , origin => [ 50,140],
Michael> backColor=>cl::Red);
Michael> I set a breakpoint on on_leave in buttons.pm; but that is not
Michael> reached at a mouse leave situation, but only when a click is done
Michael> on a button.
Michael> In fact there is no on_mouseleave event routine for Radio at all!
Michael> It it only provided for Buttons Moduifications did't help
Michael> however, because of that "focus" attribut!!
Michael> Even when the repaint would occur, that would be slightly to
Michael> late. I think the basic flaw lies in not updating Radio->focus
Michael> correctly.....
Michael> Kindly Mike
Michael> ----- Original Message ----- From: "Dmitry Karasik"
Michael> <dmitry_at_karasik.eu.org> To: <prima_at_prima.eu.org> Sent: Friday,
Michael> February 14, 2003 10:41 AM Subject: Re: Minor Redraw Bug
Michael> Hi Michael!
Michael> On 13 Feb 03 at 19:09, "Michael" (Michael Peuser h) wrote:
Michael> When pressing a - lets say - radio button hilite colors will be
Michael> used for display. After release this does not change, probably
Michael> because the atribute 'focus' is not updated correctly. After the
Michael> window is repainted colors are o.k. again; however it does not
Michael> help to try to repaint from onClick... So if you use colors or
Michael> backColors you have to force a repaint somehow...
Michael> I wasn't able to reproduce your results, - can you post the whole
Michael> code and describe step by step, how does it work for you, and how
Michael> do you think it should?
Michael> Because as for now, I can only think that onEnter and onLeave
Michael> events escaped you, because Buttons are repainted automatically
Michael> on these events.
Michael> -- Sincerely, Dmitry
Michael> --- www.karasik.eu.org ---
Michael> Life ain't fair, but the root password helps. - BOFH
-- Sincerely, Dmitry --- www.karasik.eu.org --- Life ain't fair, but the root password helps. - BOFHReceived on Sat 15 Feb 2003 - 13:18:51 CET
This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:04 CET