Why does GetRect behaves differently on Linux and Windows? - reporting only the panel portion in frame view in Linux

Hi to users of both Windows and Linux,

There are some slight incompatibilities between Windows and Linux and if anyone can explain this, it may help.

Specifically, I noticed that GetRect on Windows reports correct height of a panel even if outside a visible range on screen - i.e. you need to scroll down to it.

However, on Linux on both CentOs7 and Ubuntu 14.04 GetRect reports correct size for panels within the frame view and reports zero for panels outside the view and reports partial height when a panel is half within view. This messes up any scroll calculations so scrolling does not perform correctly on Linux. However, when the window is resized the system knows how to recover. I tried using Refresh and Update on the frame window, yet this does not do the trick - only a manual resize window by the user fixes things.

This suggests that a fix is possible - if a user can fix this by resizing a window, there must be a simple way to do this with a command - even if there is incompatibility between systems.

Can anyone suggest a simple solution that may work, or point out to the problem from just reading those lines?

I am using WxPython 3.0 on all systems. The Linux versions I am using are installed on CentOs7 by:

conda install wxpython

and installed on Ubuntu 14.04LTS using:

conda install wxpython -c asmeurer

I hope someone can figure this out.

Jacob

Have you tried using the widget inspector? Maybe there is another attribute you can use, like the widget's virtual size?

Thanks Nathan,

This was good advice from your side. It helped narrowing down the issue.

When using the inspection app I found out that initially the size of the panels is correct. Only when I do the procedure that adds a panel all the panels that are not within view get size 0 for their size and virtual size.

At this point the inspection tool was not sufficient to pin point the problem so I used WinPDB to find the offending instruction. Apparently the SetScrollBars method changes the sizes of all panels outside view to zero.

I was using this command in the past to refresh the panel size information. It was needed in the past for some reason. Apparently it breaks things on Linux with the new WxPython. I have a lead now. I hope this fixes the issue. I will get back to the list if this is not the final resolution. I hope, however, this resolves it.

        Jacob

···

Sent from my iPhone

On Aug 9, 2014, at 12:56 PM, Nathan McCorkle <nmz787@gmail.com> wrote:

Have you tried using the widget inspector? Maybe there is another attribute you can use, like the widget's virtual size?

--
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/LZDoSRlnkX0/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,

You may be glad to know that this issue was resolved after following your advice and a little bit more exploring, I found a solution to the issue on the list. Here is a link to a similar problem and the solution:

https://groups.google.com/forum/#!msg/wxpython-users/obPyZiolOc0/UyecRrHvN90J

Basically, my scroll bar code was more complicated than needed and was trying to reconstruct using a loop and GetRect what a couple of WxPython commands can do much better to handle scrolling.

I hope this redirection will help others.

Jacob

···

On Sat, Aug 9, 2014 at 4:32 PM, Work jacob.barhak@gmail.com wrote:

Thanks Nathan,

This was good advice from your side. It helped narrowing down the issue.

When using the inspection app I found out that initially the size of the panels is correct. Only when I do the procedure that adds a panel all the panels that are not within view get size 0 for their size and virtual size.

At this point the inspection tool was not sufficient to pin point the problem so I used WinPDB to find the offending instruction. Apparently the SetScrollBars method changes the sizes of all panels outside view to zero.

I was using this command in the past to refresh the panel size information. It was needed in the past for some reason. Apparently it breaks things on Linux with the new WxPython. I have a lead now. I hope this fixes the issue. I will get back to the list if this is not the final resolution. I hope, however, this resolves it.

    Jacob

Sent from my iPhone

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

Have you tried using the widget inspector? Maybe there is another attribute you can use, like the widget’s virtual size?

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/LZDoSRlnkX0/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.