Kirix Support Forums

Toolbar & ComboBoxes?

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Toolbar & ComboBoxes?

Postby Spicerun on Wed Apr 05, 2006 4:03 pm

Hi,

I have a toolbar being placed in a pane at top that has 3 wxcomboboxes in a row (ie - view_type, font_name, font_size) of various sizes. The toolbar shows up in the pane initially, but when a dialog/message box gets launched for any reason, the last combobox (in this case, font_size) disappears from the end of the toolbar? Is there a finite limit to the size of toolbars in wxAUI that causes that? or what am I doing wrong? I do not see this problem with the toolbars that only have buttons & bitmaps in them.

UPDATE: Sorry, forgot to include the following:

Compiled on wxGTK under Gentoo Linux, stock kernel-2.6.17-rc1, with gcc-4.10, wxWidgets-2.6.3, and gtk+-2.8.13 . wxAUI is being compiled as a static object linked with the wxWidgets application.

Otherwise, I'm extremely pleased with how wxAUI is operating and has integrated into our project. Keep up the good work.

UPDATE 2: To see the exact code, check it out from the CVS Repository at http://www.sourceforge.net/projects/wxtuxcards.

And this poses a second question, since I have put the wxAUI source code in the source directory of wxtuxcards, is this permissable, and where do I need to include credits (I expect to have the pages and documentation reflecting that wxAUI-0.9.1 is included)?

Thanks,
--spicerun
Spicerun
Registered User
 
Posts: 4
Joined: Thu Mar 09, 2006 7:58 am

licensing/acknowledgement terms

Postby Ken on Thu Apr 06, 2006 10:35 am

Spicerun,

Regarding your second question, wxAUI is licensed under the wxWidgets license as discussed at the wxWidgets site. Since it appears your project is licensed under the GPL, your main concern should end up being the LGPL as the wxWidgets commercial exception shouldn't affect your project.

If you follow the license terms, such as retaining copyright notices on redistributed source code (LGPL, Section 1), you will be good to go -- Kirix does not require any additional terms outside the wxWidgets license. However, if you *want* to give extra acknowledgements and credits outside the scope of the license, we surely won't stop you. :D

All the best,
ken
User avatar
Ken
Kirix Support Team
 
Posts: 147
Joined: Mon Dec 19, 2005 10:36 am

Re: Toolbar & ComboBoxes?

Postby abligh on Fri Apr 07, 2006 9:00 am

Spicerun wrote:Hi,

I have a toolbar being placed in a pane at top that has 3 wxcomboboxes in a row (ie - view_type, font_name, font_size) of various sizes. The toolbar shows up in the pane initially, but when a dialog/message box gets launched for any reason, the last combobox (in this case, font_size) disappears from the end of the toolbar? Is there a finite limit to the size of toolbars in wxAUI that causes that? or what am I doing wrong? I do not see this problem with the toolbars that only have buttons & bitmaps in them.


I'd be betting this is a wxToolbar limitation not a wxAUI limitiation. Unless you are in desperate need of other wxToolbar functionaliity, I recommend using a wxPanel with an appropriate box sizer instead. wxAUI will do everything else. You can see examples of this in effect (with lots of combo boxes and just about everything else) at http://www.xaraxtreme.org/

Alex
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Re: Toolbar & ComboBoxes?

Postby Ben on Fri Apr 07, 2006 10:55 am

Spicerun wrote:Hi,

I have a toolbar being placed in a pane at top that has 3 wxcomboboxes in a row (ie - view_type, font_name, font_size) of various sizes. The toolbar shows up in the pane initially, but when a dialog/message box gets launched for any reason, the last combobox (in this case, font_size) disappears from the end of the toolbar? Is there a finite limit to the size of toolbars in wxAUI that causes that? or what am I doing wrong? I do not see this problem with the toolbars that only have buttons & bitmaps in them.



wxToolBar sizing is a tricky thing. I have also run into some problems. I agree with Alex that this is probably more of a wxToolBar problem than a wxAUI issue. We're going to do a big toolbar push pretty soon, and hopefully that will clear up the problem.

I think the wxdevs have been working on toolbar sizing, so it functions differently depending on your wx version.

Hope this helps,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Thanks Much - working workaround..

Postby Spicerun on Fri Apr 07, 2006 12:47 pm

Thanks much guys. I did as suggested and used a panel with flexible sizers for the comboboxes, and have wxAUI handling the panel. It works beautifully. I was so hung up on the toolbars, it never occurred to me to try something else....although it would be nice to fix the bug in the toolbar too so I can have comboboxes and bitmapped buttons in the same bar in future implementations. I see what you guys mean though, it could be a problem with wxWidgets toolbar implementation rather than with wxAUI..

I'll be updating the wxtuxcards web page over the weekend, and I will definitely mention that wxAUI is used within the program as well. The fix will be checked into the code tonite, but since sourceforge is taking almost 2 days to show changes in the CVS repository, it could be a while before anybody can check out that code. Ah well.....

Thanks again.

--spicerun
Spicerun
Registered User
 
Posts: 4
Joined: Thu Mar 09, 2006 7:58 am

Re: Thanks Much - working workaround..

Postby abligh on Sun Apr 09, 2006 2:45 pm

Spicerun wrote:Thanks much guys. I did as suggested and used a panel with flexible sizers for the comboboxes, and have wxAUI handling the panel. It works beautifully. I was so hung up on the toolbars, it never occurred to me to try something else....although it would be nice to fix the bug in the toolbar too so I can have comboboxes and bitmapped buttons in the same bar in future implementations.


You can always use wxBitmapButton or a close derivative. The main limitations with this are sizing (one can't make them as small as one might like), and the fact that they can't be "toggle" buttons. The latter is I believe being corrected in 2.7. Writing a class derived from wxControl to fix both problems is pretty simple (that's what I did for XaraLX though for various reasons it's a little overspecialized for general use) - the most difficult part is getting it to render sensibly on all platforms (it would be nice if the renderer class did this, but it doesn't as far as I can tell). There are some other folks who have written more flexible bitmap button classes so you might have a look around for these.

Alex
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Return to wxAUI Questions, Thoughts & Feedback