ComboCrtl demo does not behave well on Linux - scrolling dismisses popup listbox

Hello to demo.py creators, or anyone with experience in writing controls for Linux,

Whoever wrote demo.py has done a great service. It was used as good examples to create the system I am working on.

However, it seems the examples there need some polishing and perhaps upgraded in time.

I have a combo box control that is based on ComboCtrl demo in demo.py and I noticed strange behavior on Linux Ubuntu 14.04 with anaconda. The issue is that I cannot vertically scroll the list box. For some reason the click is interpreted as a lose focus event and the popup listbox closes rather than scrolling down to allow selecting a value down the list.

I went back to the basics and tried the combo box controls in demo.py and found out that the behavior is the same. Whenever a scroll bar is moved, the system closes the list box.

Is there anyway to prevent this and allow the scroll to happen? Any bind or unbind command needed during setup?

I am using WxPython 3.0 on a virtual box Ubuntu 14.04 using Anaconda 2.01 installed with the command:

conda install wxpython -c asmeurer

I hope someone can fix the demo so I can fix my code accordingly.

Jacob

Does it also happen with Choice[whatever the suffix is, maybe List]?

Hi Nathan,

The ChoiceBook demo works fine. When extending the choice list - the scrolling mechanism is different - instead of scroll bars you get an up / down arrows at the list edges. You get similar behavior in ComboBox demo under core windows/controls section. The latter example binds the focus events and skips them.

It seems these examples are more stable. I will try to see if capturing the focus events fixes my code.

However, it seems appropriate to fix the demo if it does not work well on some system.

I appreciate the idea.

         Jacob

···

Sent from my iPhone

On Aug 11, 2014, at 11:06 AM, Nathan McCorkle <nmz787@gmail.com> wrote:

Does it also happen with Choice[whatever the suffix is, maybe List]?

--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I guess I meant this one with no suffix!
http://wxpython.org/Phoenix/docs/html/Choice.html#choice

Does that have the same strange behaviour?

···

On Monday, August 11, 2014 1:21:54 PM UTC-7, Jacob Barhak wrote:

Hi Nathan,

The ChoiceBook demo works fine. When extending the choice list - the scrolling mechanism is different - instead of scroll bars you get an up / down arrows at the list edges. You get similar behavior in ComboBox demo under core windows/controls section. The latter example binds the focus events and skips them.

It seems these examples are more stable. I will try to see if capturing the focus events fixes my code.

However, it seems appropriate to fix the demo if it does not work well on some system.

I appreciate the idea.

     Jacob

Sent from my iPhone

On Aug 11, 2014, at 11:06 AM, Nathan McCorkle nmz...@gmail.com wrote:

Does it also happen with Choice[whatever the suffix is, maybe List]?


You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Nathan,

The ChoiceBook demo you will find in my last post uses the choice control.

However, I need multiple columns in my list box and changing the code base significantly to use a different control does not make sense unless there is no easy fix to the demo I mentioned.

Since the code I work on relies on the combo ctrl demo, fixing the demo will most probably provide the fix I need. And others will then be able to reliably build on this demo.

Jacob

···

Sent from my iPhone

On Aug 12, 2014, at 1:08 PM, Nathan McCorkle nmz787@gmail.com wrote:

I guess I meant this one with no suffix!
http://wxpython.org/Phoenix/docs/html/Choice.html#choice

Does that have the same strange behaviour?

On Monday, August 11, 2014 1:21:54 PM UTC-7, Jacob Barhak wrote:

Hi Nathan,

The ChoiceBook demo works fine. When extending the choice list - the scrolling mechanism is different - instead of scroll bars you get an up / down arrows at the list edges. You get similar behavior in ComboBox demo under core windows/controls section. The latter example binds the focus events and skips them.

It seems these examples are more stable. I will try to see if capturing the focus events fixes my code.

However, it seems appropriate to fix the demo if it does not work well on some system.

I appreciate the idea.

     Jacob

Sent from my iPhone

On Aug 11, 2014, at 11:06 AM, Nathan McCorkle nmz...@gmail.com wrote:

Does it also happen with Choice[whatever the suffix is, maybe List]?


You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Nathan, or anyone else interested,

You are the only one suggesting solutions here, so I guess I ask you.

I tried to run the inspection app to figure out what is the offending event. It seems that the event that may cause the problem is:

EVT_CHILD_FOCUS

This event happens twice just after clicking on the list popup scroll bar, once for the ComboBox and once for the text control. This is followed by the following event:

EVT_COMBOBOX_CLOSEUP

After which there are a few other events related to other controls that gain focus.

I tried changing the Bind for some events, yet without success.

If Nathan or anyone else has any idea for a fix I can try or even for another diagnostic, please let me know. I hope someone has an idea.

Jacob

···

Sent from my iPhone

On Aug 12, 2014, at 3:02 PM, Work jacob.barhak@gmail.com wrote:

Hi Nathan,

The ChoiceBook demo you will find in my last post uses the choice control.

However, I need multiple columns in my list box and changing the code base significantly to use a different control does not make sense unless there is no easy fix to the demo I mentioned.

Since the code I work on relies on the combo ctrl demo, fixing the demo will most probably provide the fix I need. And others will then be able to reliably build on this demo.

Jacob

Sent from my iPhone

On Aug 12, 2014, at 1:08 PM, Nathan McCorkle nmz787@gmail.com wrote:

I guess I meant this one with no suffix!
http://wxpython.org/Phoenix/docs/html/Choice.html#choice

Does that have the same strange behaviour?

On Monday, August 11, 2014 1:21:54 PM UTC-7, Jacob Barhak wrote:

Hi Nathan,

The ChoiceBook demo works fine. When extending the choice list - the scrolling mechanism is different - instead of scroll bars you get an up / down arrows at the list edges. You get similar behavior in ComboBox demo under core windows/controls section. The latter example binds the focus events and skips them.

It seems these examples are more stable. I will try to see if capturing the focus events fixes my code.

However, it seems appropriate to fix the demo if it does not work well on some system.

I appreciate the idea.

     Jacob

Sent from my iPhone

On Aug 11, 2014, at 11:06 AM, Nathan McCorkle nmz...@gmail.com wrote:

Does it also happen with Choice[whatever the suffix is, maybe List]?


You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hmm, what widget are you using exactly now (ComboCtrl, Choice, etc…)? If it has the EVT_CHILD_FOCUS handler functions in Python (rather than passing the calls into some C/C++ wxWidget module) you might try using event.Veto() to prevent the event from propagating to further handlers (the event that is passed into the handler function). Veto doesn’t work with all Events though.

···

On Monday, August 18, 2014 3:17:51 AM UTC-7, Jacob Barhak wrote:

Hi Nathan, or anyone else interested,

You are the only one suggesting solutions here, so I guess I ask you.

I tried to run the inspection app to figure out what is the offending event. It seems that the event that may cause the problem is:

EVT_CHILD_FOCUS

This event happens twice just after clicking on the list popup scroll bar, once for the ComboBox and once for the text control. This is followed by the following event:

EVT_COMBOBOX_CLOSEUP

After which there are a few other events related to other controls that gain focus.

I tried changing the Bind for some events, yet without success.

If Nathan or anyone else has any idea for a fix I can try or even for another diagnostic, please let me know. I hope someone has an idea.

Jacob

Sent from my iPhone

On Aug 12, 2014, at 3:02 PM, Work jacob....@gmail.com wrote:

Hi Nathan,

The ChoiceBook demo you will find in my last post uses the choice control.

However, I need multiple columns in my list box and changing the code base significantly to use a different control does not make sense unless there is no easy fix to the demo I mentioned.

Since the code I work on relies on the combo ctrl demo, fixing the demo will most probably provide the fix I need. And others will then be able to reliably build on this demo.

Jacob

Sent from my iPhone

On Aug 12, 2014, at 1:08 PM, Nathan McCorkle nmz...@gmail.com wrote:

I guess I meant this one with no suffix!
http://wxpython.org/Phoenix/docs/html/Choice.html#choice

Does that have the same strange behaviour?

On Monday, August 11, 2014 1:21:54 PM UTC-7, Jacob Barhak wrote:

Hi Nathan,

The ChoiceBook demo works fine. When extending the choice list - the scrolling mechanism is different - instead of scroll bars you get an up / down arrows at the list edges. You get similar behavior in ComboBox demo under core windows/controls section. The latter example binds the focus events and skips them.

It seems these examples are more stable. I will try to see if capturing the focus events fixes my code.

However, it seems appropriate to fix the demo if it does not work well on some system.

I appreciate the idea.

     Jacob

Sent from my iPhone

On Aug 11, 2014, at 11:06 AM, Nathan McCorkle nmz...@gmail.com wrote:

Does it also happen with Choice[whatever the suffix is, maybe List]?


You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi all,

···

On Mon, Aug 11, 2014 at 4:53 AM, Jacob Barhak jacob.barhak@gmail.com wrote:

Hello to demo.py creators, or anyone with experience in writing controls for Linux,

Whoever wrote demo.py has done a great service. It was used as good examples to create the system I am working on.

However, it seems the examples there need some polishing and perhaps upgraded in time.

I have a combo box control that is based on ComboCtrl demo in demo.py and I noticed strange behavior on Linux Ubuntu 14.04 with anaconda. The issue is that I cannot vertically scroll the list box. For some reason the click is interpreted as a lose focus event and the popup listbox closes rather than scrolling down to allow selecting a value down the list.

I believe you are experiencing the problem with ‘overlay scrollbars’ in Ubuntu [1]. I don’t know what could be done about it except for disabling this feature, for example test with

export LIBOVERLAY_SCROLLBAR=0

python demo/ComboCtrl.py

[1] http://askubuntu.com/questions/34214/how-do-i-disable-overlay-scrollbars

Anna

I went back to the basics and tried the combo box controls in demo.py and found out that the behavior is the same. Whenever a scroll bar is moved, the system closes the list box.

Is there anyway to prevent this and allow the scroll to happen? Any bind or unbind command needed during setup?

I am using WxPython 3.0 on a virtual box Ubuntu 14.04 using Anaconda 2.01 installed with the command:

conda install wxpython -c asmeurer

I hope someone can fix the demo so I can fix my code accordingly.

Jacob

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/d/optout.

Thanks Anna,

This seems to be the issue. Good catch.

When I execute the command:

export LIBOVERLAY_SCROLLBAR=0

And then run my application I get old style scroll bars that work in the combo box as before.

Now my question becomes, how do I ask for this old type of scroll bar from within my python application?

Using os.system with the export command will not set things properly for the already running process. Is there a proper wx mechanism for asking for the old type scrollbars?

I hope there is a simple fix.

Jacob

···

On Mon, Aug 11, 2014 at 4:53 AM, Jacob Barhak jacob.barhak@gmail.com wrote:

Hello to demo.py creators, or anyone with experience in writing controls for Linux,

Whoever wrote demo.py has done a great service. It was used as good examples to create the system I am working on.

However, it seems the examples there need some polishing and perhaps upgraded in time.

I have a combo box control that is based on ComboCtrl demo in demo.py and I noticed strange behavior on Linux Ubuntu 14.04 with anaconda. The issue is that I cannot vertically scroll the list box. For some reason the click is interpreted as a lose focus event and the popup listbox closes rather than scrolling down to allow selecting a value down the list.

I believe you are experiencing the problem with ‘overlay scrollbars’ in Ubuntu [1]. I don’t know what could be done about it except for disabling this feature, for example test with

export LIBOVERLAY_SCROLLBAR=0

python demo/ComboCtrl.py

[1] http://askubuntu.com/questions/34214/how-do-i-disable-overlay-scrollbars

Anna

I went back to the basics and tried the combo box controls in demo.py and found out that the behavior is the same. Whenever a scroll bar is moved, the system closes the list box.

Is there anyway to prevent this and allow the scroll to happen? Any bind or unbind command needed during setup?

I am using WxPython 3.0 on a virtual box Ubuntu 14.04 using Anaconda 2.01 installed with the command:

conda install wxpython -c asmeurer

I hope someone can fix the demo so I can fix my code accordingly.

Jacob

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/d/optout.

Maybe you could try (likely before the wx.App is started, or before wx is imported, though maybe I’m wrong):

os.environ[‘LIBOVERLAY_SCROLLBAR’] = 0

Thanks Nathan,

This seems to work fine. Only the command would be:

os.environ[‘LIBOVERLAY_SCROLLBAR’)=‘0’

I use this command before importing wx. I have to run more tests, yet it seems the problem is gone.

The issue with overlay scrollbars should be solved independently, yet I am happy with this fix.

Again, also thanks to Anna who isolated the issue.

Jacob

···

Sent from my iPhone

On Aug 19, 2014, at 2:14 PM, Nathan McCorkle nmz787@gmail.com wrote:

Maybe you could try (likely before the wx.App is started, or before wx is imported, though maybe I’m wrong):

os.environ[‘LIBOVERLAY_SCROLLBAR’] = 0

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sorry All,

The correct line for fixing this is:

os.environ[‘LIBOVERLAY_SCROLLBAR’]=‘0’

The previous two lines were wrong - this is what happens when you type rather than copy. This one was copied directly from a working tested version.

This fix should remove any confusion.

Jacob

···

On Tuesday, August 19, 2014 5:01:28 PM UTC-5, Jacob Barhak wrote:

Thanks Nathan,

This seems to work fine. Only the command would be:

os.environ[‘LIBOVERLAY_SCROLLBAR’)=‘0’

I use this command before importing wx. I have to run more tests, yet it seems the problem is gone.

The issue with overlay scrollbars should be solved independently, yet I am happy with this fix.

Again, also thanks to Anna who isolated the issue.

Jacob

Sent from my iPhone

On Aug 19, 2014, at 2:14 PM, Nathan McCorkle nmz787@gmail.com wrote:

Maybe you could try (likely before the wx.App is started, or before wx is imported, though maybe I’m wrong):

os.environ[‘LIBOVERLAY_SCROLLBAR’] = 0

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/aj-psdRmDcE/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.