Search found 133 matches

by Kvaz1r
Sat Aug 17, 2019 8:26 pm
Forum: C++ Development
Topic: wxChoice and event wxEVT_COMMAND_CHOICE_SELECTED
Replies: 4
Views: 122

Re: wxChoice and event wxEVT_COMMAND_CHOICE_SELECTED

It would be better if you provided reproducible example. Does this code works for you? #include <wx/wx.h> class MyFrame : public wxFrame { public: MyFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title) { wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); wxString m_choiceChoices[] = { wxT("...
by Kvaz1r
Sat Aug 17, 2019 6:52 am
Forum: C++ Development
Topic: Help to create a button Very simple.
Replies: 7
Views: 136

Re: Help to create a button Very simple.

I don't know why it happens, but usually one can use sizers for widget layouting. So you can do it this way: #include <wx/wx.h> class FrmPrincipal : public wxFrame { public: FrmPrincipal() : wxFrame(NULL, wxID_ANY, "2019") { wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); wxButton* MyButton = new...
by Kvaz1r
Thu Aug 15, 2019 7:06 am
Forum: C++ Development
Topic: Restore wxStyledTextCtrl Multicursor after replace
Replies: 5
Views: 203

Re: Restore wxStyledTextCtrl Multicursor after replace

How exactly it didn't work? Carets are not restored or they restored on wrong positions?
by Kvaz1r
Sun Aug 11, 2019 8:00 am
Forum: C++ Development
Topic: wxRichTextCtrl Text Not Centering
Replies: 6
Views: 341

Re: wxRichTextCtrl Text Not Centering

I've opened a new ticket - https://trac.wxwidgets.org/ticket/18464
by Kvaz1r
Mon Jul 29, 2019 3:30 pm
Forum: C++ Development
Topic: wxButton - disable not working
Replies: 2
Views: 114

Re: wxButton - disable not working

It hard to say without full reproducible code but you shouldn't call GUI function from worker thread at all, so it's almost certain the reason of behaviour in that.
by Kvaz1r
Sat Jul 27, 2019 8:26 pm
Forum: C++ Development
Topic: How to open new frame from button
Replies: 19
Views: 388

Re: How to open new frame from button

For this purpose there is wxWizard class.
Tutorial
wxWiki page
by Kvaz1r
Sat Jul 27, 2019 4:23 pm
Forum: C++ Development
Topic: How to open new frame from button
Replies: 19
Views: 388

Re: How to open new frame from button

Hello. What is purpose of the second frame? Is it dialog? Or it's step-by-step process ot something else?
by Kvaz1r
Fri Jul 26, 2019 8:59 am
Forum: C++ Development
Topic: wxButton->Disable(); throws read access violation exception
Replies: 9
Views: 225

Re: wxButton->Disable(); throws read access violation exception

ok, where is stored and created controlPanel? Is it really reachable from handler?
by Kvaz1r
Fri Jul 26, 2019 8:37 am
Forum: C++ Development
Topic: wxButton->Disable(); throws read access violation exception
Replies: 9
Views: 225

Re: wxButton->Disable(); throws read access violation exception

Code: Select all

wxBitmapButton* buttonSettings = createButton(controlPanel, "res/images/ic_settings.png", _("settings"), 101);
That's wrong, here you create local variable not assign to member one.
by Kvaz1r
Thu Jul 18, 2019 7:41 am
Forum: C++ Development
Topic: Creating Socket in secondary thread confusion
Replies: 2
Views: 116

Re: Creating Socket in secondary thread confusion

Code looks ok for me. Can you provide MCVE for reproducing the behaviour? Edit: The documentation said one must call Initialize/0 when use wxSocket from multiple threads: When using wxSocket from multiple threads, even implicitly (e.g. by using wxFTP or wxHTTP in another thread) you must initialize ...
by Kvaz1r
Sun Jul 14, 2019 8:06 am
Forum: C++ Development
Topic: wxRichTextCtrl Text Not Centering
Replies: 6
Views: 341

Re: wxRichTextCtrl Text Not Centering

doublemax wrote:
Sun Jul 14, 2019 7:45 am
You need a matching EndAlignment() call.
It didn't work with this changes either. But if called Newline/0 style works as expected.
by Kvaz1r
Sun Jul 14, 2019 7:41 am
Forum: C++ Development
Topic: wxRichTextCtrl Text Not Centering
Replies: 6
Views: 341

Re: wxRichTextCtrl Text Not Centering

It seems like a bug (alignment don't applied to one-line text) so I would create new ticket on https://trac.wxwidgets.org.
by Kvaz1r
Fri Jul 12, 2019 6:42 pm
Forum: C++ Development
Topic: Window Sizing
Replies: 8
Views: 220

Re: Window Sizing

You should to handle wxSizeEvent.
by Kvaz1r
Fri Jul 12, 2019 3:51 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 9
Views: 547

Re: wxPdfDocument wich fonts can I use?

I copied font file into project directory and did so:

Code: Select all

pdf.AddFont("PT","",wxS("PTM55FT.ttf"));
pdf.SetFont(wxS("PT"),wxS(""),12);
'?' instead of text could be happened because font don't recognize unicode symbols.
by Kvaz1r
Wed Jul 10, 2019 7:00 pm
Forum: C++ Development
Topic: User Input
Replies: 11
Views: 355

Re: User Input

Provide full code for reproducing the behaviour.

Btw there is samples folder that contains examples of using for biggest part of the library.