Search found 1586 matches

by PB
Fri Jul 20, 2018 4:45 pm
Forum: C++ Development
Topic: Better way to refresh ListCtrl/ListView items [SOLVED]
Replies: 9
Views: 66

Re: Better way to refresh ListCtrl/ListView items [SOLVED]

BTW, wxListCtrl in the virtual mode has RefreshItems() , in case you would need to refresh only a subset of items. BTW2, I hope it was understood but just to be sure: you also need to tell the list how many items are there with SetItemCount() . BTW3, the methods relevant for the virtual mode are lis...
by PB
Fri Jul 20, 2018 3:14 pm
Forum: C++ Development
Topic: Better way to refresh ListCtrl/ListView items [SOLVED]
Replies: 9
Views: 66

Re: Better way to refresh ListCtrl/ListView items [SOLVED]

If your list happens to be displayed only in the report, what about using wxLC_VIRTUAL? Otherwise there is probably not much to do.

Its lack of elegance aside, Is there an actual issue (performance etc.) with the current implementation?
by PB
Thu Jul 19, 2018 2:22 pm
Forum: C++ Development
Topic: How to set focus on message box button.
Replies: 10
Views: 94

Re: How to set focus on message box button.

I see, thanks.
by PB
Thu Jul 19, 2018 12:00 pm
Forum: C++ Development
Topic: How to set focus on message box button.
Replies: 10
Views: 94

Re: How to set focus on message box button.

Just curious: how would you access the instance of the dialog displayed by wxMessageBox()?
by PB
Thu Jul 19, 2018 7:23 am
Forum: C++ Development
Topic: "bitmap can't be selected in another DC" assertion [SOLVED]
Replies: 2
Views: 44

Re: "bitmap can't be selected in another DC" assertion [SOLVED]

The documentation clearly states
...before performing any other operations on the bitmap data, the bitmap must be selected out of the memory DC


Did you try that, i.e., calling

Code: Select all

mdc.SelectObject(wxNullBitmap);
before using bmp?
by PB
Wed Jul 18, 2018 6:28 pm
Forum: C++ Development
Topic: How to set focus on message box button.
Replies: 10
Views: 94

Re: How to set focus on message box button.

Actually it seems I was wrong. I can test only on MSW but wxUIActionSimulator seems to work with wxMessageBox: #include <wx/wx.h> #include <wx/uiaction.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, "Test", wxDefaultPosition, wxSize(600, 400)) { wxBoxSizer*...
by PB
Wed Jul 18, 2018 5:22 pm
Forum: C++ Development
Topic: How to set focus on message box button.
Replies: 10
Views: 94

Re: How to set focus on message box button.

wxMessageBox() will display a modal wxMessageDialog (which at least on MSW can be a native OS-provided dialog). I may be wrong but: How would you expect to do anything that affects that dialog: there is no dialog before you call wxMessageBox() and the function won't return till after the dialog was ...
by PB
Wed Jul 18, 2018 4:16 pm
Forum: C++ Development
Topic: User sizable panel?
Replies: 8
Views: 89

Re: User sizable panel?

Did you look into wxSashWindow? I have no experience with this class, but AFAIK it will only provide mouse resizing of the child window, the "form" resizing logic, i.e., what happens with other controls in the form would still need to be coded depending on your needs. TBH, I do not underst...
by PB
Sat Jul 14, 2018 7:33 pm
Forum: C++ Development
Topic: dynarray [SOLVED]
Replies: 6
Views: 119

Re: dynarray [SOLVED]

#include <wx/dynarray.h> WX_DECLARE_OBJARRAY(wxTextCtrl*, ArrayOfCFTextCtrlPointers); What is the problem here? As doublemax already said, you are not to use a pointer to the class in the declaration of wxObjArray. The documentation states that, e.g. here , but I guess it could be a bit clearer abo...
by PB
Fri Jul 13, 2018 7:22 pm
Forum: C++ Development
Topic: dynarray [SOLVED]
Replies: 6
Views: 119

Re: dynarray [SOLVED]

There have been several changes to the obsolete containers code, see
https://github.com/wxWidgets/wxWidgets/search?q=array&unscoped_q=array&type=Commits

I guess these should not break anything in the existing code (assuming the code was correct)...
by PB
Fri Jul 13, 2018 9:45 am
Forum: C++ Development
Topic: Width of wxOwnerDrawnComboBox
Replies: 3
Views: 49

Re: Width of wxOwnerDrawnComboBox

Assuming that the layout algorithm uses the best size for the control which is implemented as wxSize wxOwnerDrawnComboBox::DoGetBestSize() const { if ( GetCount() == 0 ) return wxComboCtrlBase::DoGetBestSize(); wxOwnerDrawnComboBox* odc = const_cast<wxOwnerDrawnComboBox*>(this); // TODO: this class ...
by PB
Thu Jul 12, 2018 7:31 pm
Forum: C++ Development
Topic: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]
Replies: 9
Views: 202

Re: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]

usernameak wrote:It works with wxIntegerValidator.
usernameak wrote:wxWS_EX_VALIDATE_RECURSIVELY fixed the problem


This is odd, no validator should have worked without the flag. Well, I guess all's well that ends well...
by PB
Thu Jul 12, 2018 3:38 pm
Forum: C++ Development
Topic: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]
Replies: 9
Views: 202

Re: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]

Does the code from my previous post work on your setup, i.e., the method are called?
by PB
Thu Jul 12, 2018 2:26 pm
Forum: C++ Development
Topic: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]
Replies: 9
Views: 202

Re: TransferToWindow and TransferFromWindow isn't called in custom validator [SOLVED]

"Is not called in custom validator" implies that it works with a built-in one (wxGenericValidator)? This is quite important distinction to see whether the issue is with validation of your dialog in general or the custom validator only. As usual, an SSCCE would be great to have... Edit Seem...
by PB
Tue Jul 10, 2018 6:50 am
Forum: C++ Development
Topic: Dialog sizing
Replies: 4
Views: 95

Re: Dialog sizing

Regarding the width of text controls, I'm sure you know that: you can try to set their size based on number of characters you wish were visible, see http://docs.wxwidgets.org/3.1/classwx_control.html#a7f163dbbfa581a52192a94506784efc9 BTW, you could also simplify creating the buttons sizer with Creat...

Go to advanced search