Is there any option or style I can apply to a field so that it will be
never be displayed, even if a show is done on it?
The reason I need this is I have a great big existing app, and I've
been asked to remove a field from the screen. But data is put into the
field by the code and then used all over the place by other parts of
the code. To actually remove the field would require massive code
changes. To avoid that I had the idea to leave the field, but just
never display it. But it's part of a panel that is displayed and
hidden based on user activity. So even if I initially set it to not be
displayed, it can still get displayed when the panel is shown.
I’ve never tried this, but I see there is a style that is common to all objects derived from wxWindow (that is, all widgets), which is:
“wxTRANSPARENT_WINDOW: The window is transparent, that is, it will not receive paint events. Windows only.”
If you only need it on Windows, maybe that would work.
Are you sure that when the panel that this field is on gets called Show() it definitely shows the field, too? Have you tried just using .Hide() on that field but not the panel it’s on?
I've never tried this, but I see there is a style that is common to all
objects derived from wxWindow (that is, all widgets), which is:
"wxTRANSPARENT_WINDOW: The window is transparent, that is, it will not
receive paint events. Windows only."
If you only need it on Windows, maybe that would work.
No this app runs on Linux.
Are you sure that when the panel that this field is on gets called Show() it
definitely shows the field, too?
No, I have to verify that - I just assumed it would be shown.
Have you tried just using .Hide() on that
field but not the panel it's on?
Yeah, I thought of that. Seem kludgy, as the the app has a global
hide/show function that is called with the panel to show and it shows
that and hides everything else in that parent. It doesn't have
knowledge of each panel's individual items.
···
On Mon, Jan 27, 2014 at 10:48 AM, C M <cmpython@gmail.com> wrote:
On Mon, Jan 27, 2014 at 12:17 PM, Larry Martell <larry.martell@gmail.com> > wrote:
Is there any option or style I can apply to a field so that it will be
never be displayed, even if a show is done on it?
The reason I need this is I have a great big existing app, and I've
been asked to remove a field from the screen. But data is put into the
field by the code and then used all over the place by other parts of
the code. To actually remove the field would require massive code
changes. To avoid that I had the idea to leave the field, but just
never display it. But it's part of a panel that is displayed and
hidden based on user activity. So even if I initially set it to not be
displayed, it can still get displayed when the panel is shown.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
> Are you sure that when the panel that this field is on gets called
Show() it
> definitely shows the field, too?
No, I have to verify that - I just assumed it would be shown.
I sort of mis-wrote that, in that I meant are you sure that if you .Hide()
the field it will definitely be shown by it's parent panel being shown,
which I then suggested....to which you responded:
Yeah, I thought of that. Seem kludgy, as the the app has a global
hide/show function that is called with the panel to show and it shows
that and hides everything else in that parent. It doesn't have
knowledge of each panel's individual items.
It is maybe a little kludgy, but it seems like that is inherent in this
brittle architecture. This is a good case for something like MVC pattern
or some other way to make the GUI parts and logic parts much more
independent (for future projects...this is something I need to keep in mind
myself!).
I was wondering if you could just set the size of the field to be 0. This
way, whether it is shown or not, there is nothing for the user to see. A
hack, but if it works...
···
> On Mon, Jan 27, 2014 at 12:17 PM, Larry Martell <larry.martell@gmail.com > > > > wrote:
>>
>> Is there any option or style I can apply to a field so that it will be
>> never be displayed, even if a show is done on it?
>>
>> The reason I need this is I have a great big existing app, and I've
>> been asked to remove a field from the screen. But data is put into the
>> field by the code and then used all over the place by other parts of
>> the code. To actually remove the field would require massive code
>> changes. To avoid that I had the idea to leave the field, but just
>> never display it. But it's part of a panel that is displayed and
>> hidden based on user activity. So even if I initially set it to not be
>> displayed, it can still get displayed when the panel is shown.
>>
>> --
>> You received this message because you are subscribed to the Google
Groups
>> "wxPython-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send
an
>> email to wxpython-users+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to wxpython-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I was wondering if you could just set the size of the field to be 0.
This way, whether it is shown or not, there is nothing for the user to
see. A hack, but if it works...
This would hide the control visually, but it would still be present in
the tab order and any program accessing the panel's controls through
APIs, e.g. accessibility clients such as screen readers, would still see
the field and thus be able to modify it. You could set the field to
read-only, remove its tab index and all manour of other hacks, but
you're heading towards a very inconsistent user experience. The price
you pay for inflexible design, I guess.
> Are you sure that when the panel that this field is on gets called
> Show() it
> definitely shows the field, too?
No, I have to verify that - I just assumed it would be shown.
I sort of mis-wrote that, in that I meant are you sure that if you .Hide()
the field it will definitely be shown by it's parent panel being shown,
which I then suggested....to which you responded:
I knew what you mean, and you are correct. If I hide the fields they
are not shown when the parent panel is shown. I should have checked
this before posting. Thanks.
···
On Mon, Jan 27, 2014 at 1:57 PM, C M <cmpython@gmail.com> wrote:
Yeah, I thought of that. Seem kludgy, as the the app has a global
hide/show function that is called with the panel to show and it shows
that and hides everything else in that parent. It doesn't have
knowledge of each panel's individual items.
It is maybe a little kludgy, but it seems like that is inherent in this
brittle architecture. This is a good case for something like MVC pattern or
some other way to make the GUI parts and logic parts much more independent
(for future projects...this is something I need to keep in mind myself!).
I was wondering if you could just set the size of the field to be 0. This
way, whether it is shown or not, there is nothing for the user to see. A
hack, but if it works...
> On Mon, Jan 27, 2014 at 12:17 PM, Larry Martell >> > <larry.martell@gmail.com> >> > wrote:
>>
>> Is there any option or style I can apply to a field so that it will be
>> never be displayed, even if a show is done on it?
>>
>> The reason I need this is I have a great big existing app, and I've
>> been asked to remove a field from the screen. But data is put into the
>> field by the code and then used all over the place by other parts of
>> the code. To actually remove the field would require massive code
>> changes. To avoid that I had the idea to leave the field, but just
>> never display it. But it's part of a panel that is displayed and
>> hidden based on user activity. So even if I initially set it to not be
>> displayed, it can still get displayed when the panel is shown.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups
>> "wxPython-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an
>> email to wxpython-users+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups
> "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an
> email to wxpython-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.