wxListBox when maximized Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

wxListBox when maximized

Post by archman007 » Mon Jan 13, 2020 1:19 pm

Hello Folk,

I have a wxListBox item that does not resize when I maximize the main application frame.

I have also placed the listbox on a notebook panel in a box sizer.

I am willing to provide the code if necessary.

Thank You.
Last edited by archman007 on Tue Jan 14, 2020 11:33 pm, edited 1 time in total.

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListBox when mazimized

Post by doublemax » Mon Jan 13, 2020 2:36 pm

Does it resize when you resize the window manually?

And yes, please show some code, especially everything sizer-related.
Use the source, Luke!

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when mazimized

Post by archman007 » Mon Jan 13, 2020 9:45 pm

The app does not resize the window manually nor on maximize.

I am attaching the associated project.

Thanks

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListBox when mazimized

Post by doublemax » Tue Jan 14, 2020 6:15 am

archman007 wrote:
Mon Jan 13, 2020 9:45 pm
I am attaching the associated project.
Did you forget to attach it?
Use the source, Luke!

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when mazimized

Post by archman007 » Tue Jan 14, 2020 2:24 pm

I am consistently getting a HTTP error when I try to add attachments. I have tried several browsers. How do I overcome this.

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListBox when mazimized

Post by doublemax » Tue Jan 14, 2020 2:47 pm

archman007 wrote:
Tue Jan 14, 2020 2:24 pm
I am consistently getting a HTTP error when I try to add attachments. I have tried several browsers. How do I overcome this.
No idea, i never had this. Put the code on pastebin and post the link here. It shouldn't be that much anyway.
Use the source, Luke!

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when mazimized

Post by archman007 » Tue Jan 14, 2020 6:27 pm

Paste bin code is https://pastebin.com/PQke2MkR

Please let me know if additional information is required.

Thank You

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListBox when mazimized

Post by doublemax » Tue Jan 14, 2020 7:56 pm

Oh dear, a resource file is probably the worst to analyze by just reading it...

I can't spot anything wrong right away (but it's easy to miss something somewhere), but my first suspicion would be the "OnPanel1Resize" size event handler. You need to call event.Skip() inside, otherwise the sizer layout code will not be executed.
Use the source, Luke!

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when mazimized

Post by archman007 » Tue Jan 14, 2020 11:25 pm

I apologize for assuming you had a way to work with just the wxs file.

I ma attaching a more complete zip file. If you need additional code I will zip the entire project.

Please try this.

https://pastebin.com/2wzguUmU

I will persist until I meet all requirements.

Thank You

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when maximized

Post by archman007 » Tue Jan 14, 2020 11:45 pm

doublemax.

As soon as i put the envnt.Skip() in the onResize event program was working as desired.

No further need for additional debugging and I accepted your answer.

User avatar
doublemax
Moderator
Moderator
Posts: 14954
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListBox when maximized

Post by doublemax » Wed Jan 15, 2020 6:20 am

archman007 wrote:
Tue Jan 14, 2020 11:45 pm
As soon as i put the envnt.Skip() in the onResize event program was working as desired.
Good. Do you actually need the resize handler for anything? I assume not. In that case you should remove/disable it completely. Otherwise you might be starting to put that code into every window, which is not necessary.
Use the source, Luke!

User avatar
archman007
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon Jan 13, 2020 1:06 pm

Re: wxListBox when maximized

Post by archman007 » Wed Jan 15, 2020 12:42 pm

Next on my list is to remove the Resize handlers. Because I finally achieved the functionality I desire I am a feeling better about my project. :D

Thanks

Post Reply