how to disable a panel with controls, without affecting the visibility ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to disable a panel with controls, without affecting the visibility ?

stef mientki-4
hello,

I've a panel with a lot of controls ( textctrl, choice, combo, grid, buttons).
Now I want to disable alle the controls on the panel,
which can easily be done by setting Panel.Enable(False).
there's one disadvantage,
because everything is disabled, everything gets grayed and becomes almost unreadable.

Is there a way to disable controls like Choice / Combo,
without changing the color or at least give it a good readable color ?
( I know it's a bad thing to change the default behavior, but in this case it's really necessary)

thanks,
Stef

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: how to disable a panel with controls, without affecting the visibility ?

Robin Dunn
On 5/27/11 4:02 PM, Stef Mientki wrote:

> hello,
>
> I've a panel with a lot of controls ( textctrl, choice, combo, grid, buttons).
> Now I want to disable alle the controls on the panel,
> which can easily be done by setting Panel.Enable(False).
> there's one disadvantage,
> because everything is disabled, everything gets grayed and becomes almost unreadable.
>
> Is there a way to disable controls like Choice / Combo,
> without changing the color or at least give it a good readable color ?
> ( I know it's a bad thing to change the default behavior, but in this case it's really necessary)

One way that comes to mind is to intercept the mouse, key, and char
events for each of the widgets.  There are some widget types where it
may not fully block everything, but it probably will for the basic
widget types.


--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: how to disable a panel with controls, without affecting the visibility ?

stef mientki-4
On 30-05-2011 21:23, Robin Dunn wrote:

> On 5/27/11 4:02 PM, Stef Mientki wrote:
>> hello,
>>
>> I've a panel with a lot of controls ( textctrl, choice, combo, grid, buttons).
>> Now I want to disable alle the controls on the panel,
>> which can easily be done by setting Panel.Enable(False).
>> there's one disadvantage,
>> because everything is disabled, everything gets grayed and becomes almost unreadable.
>>
>> Is there a way to disable controls like Choice / Combo,
>> without changing the color or at least give it a good readable color ?
>> ( I know it's a bad thing to change the default behavior, but in this case it's really necessary)
>
> One way that comes to mind is to intercept the mouse, key, and char events for each of the
> widgets.  There are some widget types where it may not fully block everything, but it probably
> will for the basic widget types.
>
>
thanks Robin,
yeah, that's a possibility.

I'm also thinking of another solution
(O like to keep things as simple as possible),
I think I can limit the widgets to TextCtrl and Choice,
TextCtrl can be disabled (or made readonly) while maintaining the readibility.
For the Choice another solution is needed,
making a new widget consisting of a Choice and TextCtrl, placed over each other,
while only one of them is visible,
this might work.

cheers,
Stef

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: how to disable a panel with controls, without affecting the visibility ?

stef mientki-4
In reply to this post by Robin Dunn
On 30-05-2011 21:23, Robin Dunn wrote:

> On 5/27/11 4:02 PM, Stef Mientki wrote:
>> hello,
>>
>> I've a panel with a lot of controls ( textctrl, choice, combo, grid, buttons).
>> Now I want to disable alle the controls on the panel,
>> which can easily be done by setting Panel.Enable(False).
>> there's one disadvantage,
>> because everything is disabled, everything gets grayed and becomes almost unreadable.
>>
>> Is there a way to disable controls like Choice / Combo,
>> without changing the color or at least give it a good readable color ?
>> ( I know it's a bad thing to change the default behavior, but in this case it's really necessary)
>
> One way that comes to mind is to intercept the mouse, key, and char events for each of the
> widgets.  There are some widget types where it may not fully block everything, but it probably
> will for the basic widget types.
>
>
thanks Robin,
yeahthat's a possibility.

I'm also thinking of another solution
(O like to keep things as simple as possible),
I think I can limit the widgets to TextCtrl and Choice,
TextCtrl can be disabled (or made readonly) while maintaining the readibility.
For the Choice another solution is needed,
making a new widget consisting of a Choice and TextCtrl, placed over each other,
while only one of them is visible,
this might work.

cheers,
Stef

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: how to disable a panel with controls, without affecting the visibility ?

Rufus V. Smith
Perhaps you can draw a transparent window in front of it?

Rufus

----- Original Message -----
From: "Stef Mientki" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, May 31, 2011 1:49 PM
Subject: Re: [wxPython-users] how to disable a panel with controls, without
affecting the visibility ?


> On 30-05-2011 21:23, Robin Dunn wrote:
>> On 5/27/11 4:02 PM, Stef Mientki wrote:
>>> hello,
>>>
>>> I've a panel with a lot of controls ( textctrl, choice, combo, grid,
>>> buttons).
>>> Now I want to disable alle the controls on the panel,
>>> which can easily be done by setting Panel.Enable(False).
>>> there's one disadvantage,
>>> because everything is disabled, everything gets grayed and becomes
>>> almost unreadable.
>>>
>>> Is there a way to disable controls like Choice / Combo,
>>> without changing the color or at least give it a good readable color ?
>>> ( I know it's a bad thing to change the default behavior, but in this
>>> case it's really necessary)
>>
>> One way that comes to mind is to intercept the mouse, key, and char
>> events for each of the
>> widgets.  There are some widget types where it may not fully block
>> everything, but it probably
>> will for the basic widget types.
>>
>>
> thanks Robin,
> yeahthat's a possibility.
>
> I'm also thinking of another solution
> (O like to keep things as simple as possible),
> I think I can limit the widgets to TextCtrl and Choice,
> TextCtrl can be disabled (or made readonly) while maintaining the
> readibility.
> For the Choice another solution is needed,
> making a new widget consisting of a Choice and TextCtrl, placed over each
> other,
> while only one of them is visible,
> this might work.
>
> cheers,
> Stef
>
> --
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wxPython-users?hl=en 

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en