wxBitmap Button Missing from WxWidgets 2.8.12

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
dominover
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 23, 2012 3:00 am

wxBitmap Button Missing from WxWidgets 2.8.12

Post by dominover »

Does anyone know why the wxBitmapButton might be missing from wxWidges 2.8.12? I've compiled this myself with a MingW compiler and am using it on Code::Blocks.

Could this be an error or is the Bitmap Button only available in a later version?

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

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by doublemax »

wxBitmapButton already exists in wx 2.8.x.

Did you get a compiler or linker error? Did you include <wx/bmpbuttn.h> ?
Use the source, Luke!
dominover
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 23, 2012 3:00 am

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by dominover »

No errors..
The issue I have is that in Code::Blocks at the bottom of the editor screen there is a row of widgets separated by different buttons. Those widgets don't contain the wxBitmap button (amongst the drag and drop items). The range seems small compared to what I believe I saw in the widgets list of wxDevC++. Is the list only limited in Code::Blocks when compiled myself or do I have to do something else to have this drag and drop functionality for a wxBitmapButton control?

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

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by doublemax »

I don't usually use C:B, but i just checked v 10.05 and the wxBitmapButton is definitely there (6th from the right). Which gui editor did you choose, wxSmith or wxFormBuilder? I checked with wxSmith.
Use the source, Luke!
dominover
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sun Sep 23, 2012 3:00 am

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by dominover »

wxSmith.. Would it make a difference? I wasn't aware that there was another.
I just started a new project in Code::Blocks and there's a choice to use wxSmith or wxFormBuilder. Can I choose either or do I have to have something like FormBuilder installed to do this. Nothing seems to be coming up when I do select the FormBuilder option so that's probably answers it. Is FormBuilder any better than wxSmith? Any advantages to either.

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

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by doublemax »

Is FormBuilder any better than wxSmith? Any advantages to either.
Sorry, no idea. As i usually don't use any GUI editor at all.
Use the source, Luke!
Radek
Super wx Problem Solver
Super wx Problem Solver
Posts: 286
Joined: Sun Sep 11, 2011 7:17 am

Re: wxBitmap Button Missing from WxWidgets 2.8.12

Post by Radek »

IMO, wxFormBuilder is far better than wxSmith. It gives you more control on your GUI, it does not contain some rather artificial restrictions known from wxSmith. Disadvantage: wxFormBuilder isn't integrated in Code Blocks and you need to run wxFB as a standalone application.

You cannot make any harm to your IDE by downloading wxFB from http://wxformbuilder.org and installing it. Run wxFB and you can explore it. On starting up, wxFB starts with "new project". Name the project and select what kind of output you want (C++, Python, XRC). Click on "path" and select where you want your files (use the ".." button for selecting a directory instead of typing the path). Click on "file" and select a name of the output files (without an extent. Enter "attempt" and you get "attempt.cpp" and "attempt.h"). You are ready for creating your GUI.

Direct the output of wxFB into your project directory. When you finish with the GUI, click "generate code" icon on the toolbar or F8 to save wxFB output. Return to Code Blocks and "Add Files" just generated by wxFB to your project. It is possible to partially integrate wxFB into Code Blocks by configuring Tools in Code Blocks.
Post Reply