Search found 144 matches

by Tapsa
Mon Nov 07, 2016 8:32 am
Forum: C++ Development
Topic: How to bind ordinary function?
Replies: 4
Views: 912

How to bind ordinary function?

How can I use this when I have no need for the event variable?

Code: Select all

void wxEvtHandler::Bind(const EventTag &eventType, Functor functor)
The only way I have achieved this is by using lambdas.
How do I simply put any normal member function as the second argument?
by Tapsa
Mon Nov 07, 2016 7:28 am
Forum: C++ Development
Topic: Problem with events when using GCC 6.2.0
Replies: 4
Views: 620

Problem with events when using GCC 6.2.0

I recently upgraded my compiler to GCC 6.2.0 which defaults to C++14. Changing no code at all, after a recompilation of all libs and my sources these calls no longer work: void AGE_Frame::OnUpdateCombo_Techs(wxCommandEvent &event) { wxMessageBox("AGE_Frame::OnUpdateCombo_Techs"); ((AGELinkedBox*)eve...
by Tapsa
Sun Oct 09, 2016 4:14 pm
Forum: C++ Development
Topic: How to make horizontal scrollbar never appear in wxListView?
Replies: 3
Views: 584

Re: How to make horizontal scrollbar never appear in wxListView?

Regardless of being able to set proper width, is there no way to force horizontal scrollbar to never appear?
I tried to use SetScrollbar(wxHORIZONTAL, 0, 0, 0); but that didn't work.
by Tapsa
Sun Oct 09, 2016 11:53 am
Forum: C++ Development
Topic: How to make horizontal scrollbar never appear in wxListView?
Replies: 3
Views: 584

How to make horizontal scrollbar never appear in wxListView?

I want to have my wxListView lists never show horizontal scrollbar in any circumstance. I am using this code to adjust the width of my only column, but it makes horizontal scrollbar appear sometimes. Bind(wxEVT_SIZE, [=](wxSizeEvent&){SetColumnWidth(0, GetClientSize().GetWidth());}); Ideally I want ...
by Tapsa
Sat Oct 08, 2016 6:57 am
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

Here are my combo popup codes: SharedComboPopup.h SharedComboPopup.cpp This is my combo box class stripped down: class AGEComboBox: public wxComboCtrl { public: AGEComboBox(wxWindow *parent, wxArrayString *choices, int width): wxComboCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxSize(width, -1), w...
by Tapsa
Fri Oct 07, 2016 8:42 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

It appears to be enough to edit wxVListBoxComboPopup, merging some necessary drawing codes from wxOwnerDrawnComboBox.
Anyway, I've effectively completed my custom popup. It feels good and works well.
by Tapsa
Thu Oct 06, 2016 3:45 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

I have tried to do that with wxVListBox for one full day, but I can no longer even get any drop box appear.
by Tapsa
Wed Oct 05, 2016 2:42 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

Can I already use it as such via some undocumented functions? I tried to set the item count in my wxODCB subclassed constructor along with custom OnDrawItem function, but the program segmentation faults at vlbox.cpp file on line 116, which makes no sense since there aren't even any pointers there. G...
by Tapsa
Wed Oct 05, 2016 1:51 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

Yes indeed! I am currently copying and editing wx codes to achieve "virtual" popup list.
by Tapsa
Tue Oct 04, 2016 11:38 am
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

We are talking about 40 to 160 MB of wasted memory. Qt also has this kind of functionality (model-view system) implemented long ago.
by Tapsa
Mon Oct 03, 2016 6:09 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Re: Which files I need to modify to customize wxOwnerDrawnComboBox?

I'm already using wxOwnerDrawnComboBoxes :)
Believe it or not, the strings take half of the memory my program uses.

In any case, I seem to need odcombo.h, odcombo.cpp and odcombocmn.cpp to customize wxOwnerDrawnComboBox to anything I want.
by Tapsa
Mon Oct 03, 2016 3:35 pm
Forum: Component Writing
Topic: Which files I need to modify to customize wxOwnerDrawnComboBox?
Replies: 17
Views: 5630

Which files I need to modify to customize wxOwnerDrawnComboBox?

Hi I am making for me a version of wxOwnerDrawnComboBox whose m_strings member is std::shared_ptr<wxArrayString>. I located files odcombo.h and odcombo.cpp, but what for is odcombocmn.cpp? Do I need to copy that as well? I think I only need to copy those odcombo files into my project and adjust them...
by Tapsa
Sat Oct 01, 2016 2:25 pm
Forum: C++ Development
Topic: How to share strings between many combo boxes?
Replies: 4
Views: 572

Re: How to share strings between many combo boxes?

Thank you doublemax. So there is no wxListView kind of combo box that lets me tell what to write from a function like OnGetItemText. I came up with this piece of code where I can write any string and make it look good. void AGEComboBox::OnDrawItem(wxDC &dc, const wxRect &rect, int item, int flags) c...
by Tapsa
Sat Oct 01, 2016 7:13 am
Forum: C++ Development
Topic: How to share strings between many combo boxes?
Replies: 4
Views: 572

Re: How to share strings between many combo boxes?

-.- very helpful answer