Search found 289 matches

by New Pagodi
Thu May 23, 2019 7:42 pm
Forum: C++ Development
Topic: Static drawing on wxPanel(?)
Replies: 5
Views: 69

Re: Static drawing on wxPanel(?)

Try something like this: // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWidgets head...
by New Pagodi
Thu May 23, 2019 2:05 pm
Forum: Compiler / Linking / IDE Related
Topic: Ubuntu can't link wxStyledTextCtrl
Replies: 15
Views: 170

Re: Ubuntu can't link wxStyledTextCtrl

When linking statically, you also need to include the scintilla library (wxscintilla-3.0-x86_64-w64-mingw32.a based on the picture you posted above).
by New Pagodi
Wed May 22, 2019 3:04 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 188

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

rocrail wrote:
Wed May 22, 2019 2:33 pm
Since which wxWidgets Version is this control available? 3.0?
I'm not sure when it was added, but I was recently looking at commits from 2004, so it's been in for a long time.
by New Pagodi
Wed May 22, 2019 3:03 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 188

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

You need to change

Code: Select all

`wx-config --libs std,aui`
to

Code: Select all

`wx-config --libs std,aui,stc`
by New Pagodi
Tue May 21, 2019 3:31 pm
Forum: C++ Development
Topic: wxTextCtrl: Switching on the fly from wrap to hscroll
Replies: 12
Views: 188

Re: wxTextCtrl: Switching on the fly from wrap to hscroll

Hi, OK, but what purpose has the SetWindowStyleFlag function if it has more or less no effect? In fairness, the documentation does state: Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to t...
by New Pagodi
Mon May 13, 2019 11:40 am
Forum: C++ Development
Topic: GetCaret()->Hide() makes the app crash at start-up
Replies: 3
Views: 63

Re: GetCaret()->Hide() makes the app crash at start-up

If you want to hide the caret in a styled text control, you should probably call

Code: Select all

SetCaretStyle(wxSTC_CARETSTYLE_INVISIBLE)
on the stc object.
by New Pagodi
Sat Apr 20, 2019 4:09 pm
Forum: C++ Development
Topic: Read access violation when closing my app
Replies: 5
Views: 139

Re: Read access violation when closing my app

On the page for wxTopLevelWindow, they state
Note that the instances of wxTopLevelWindow are managed by wxWidgets in the internal top level window list.
by New Pagodi
Fri Apr 19, 2019 1:34 am
Forum: C++ Development
Topic: Read access violation when closing my app
Replies: 5
Views: 139

Re: Read access violation when closing my app

You don't need to delete mainWindow. As part of application termination, wxWidgets destroys all top level widows.
by New Pagodi
Mon Apr 15, 2019 2:30 pm
Forum: C++ Development
Topic: example for modal progress bar
Replies: 4
Views: 90

Re: example for modal progress bar

The dialogs sample is in the samples folder that comes with the wxWidgets library - specifically in the folder <WXROOT>/samples/dialogs. If you're using a separate worker thread, it's very important that you never call gui methods from the secondary thread. So you'll have to update the progress dial...
by New Pagodi
Mon Apr 15, 2019 2:05 pm
Forum: C++ Development
Topic: example for modal progress bar
Replies: 4
Views: 90

Re: example for modal progress bar

It sounds like what you want is the wxProgressDialog class. There is a short example this page and larger example in the dialogs sample.
by New Pagodi
Thu Apr 11, 2019 12:36 am
Forum: C++ Development
Topic: how to hide a complex wxDialog's slow first render?
Replies: 2
Views: 92

Re: how to hide a complex wxDialog's slow first render?

The usual way to do this is to to create is to create an initially hidden panel, add all the controls to it, and then show the panel. You might want to also consider using a property grid. That way you can group things in logical categories and it would probably offer a less crowded interface for th...
by New Pagodi
Tue Apr 09, 2019 12:23 am
Forum: C++ Development
Topic: wxString to const char*
Replies: 1
Views: 62

Re: wxString to const char*

If you're using 3.0 or later, wxString can be implicitly cast to const char*. So you can just do:

Code: Select all

f(str);
If the string contains only ascii characters, that's the easiest thing to do.
by New Pagodi
Thu Apr 04, 2019 3:09 pm
Forum: C++ Development
Topic: wxNativeWindow host app
Replies: 9
Views: 200

Re: wxNativeWindow host app

@PB thanks for the efforts, I will keep googling for OSX @New Pagodi QT somehow has done it https://doc.qt.io/qt-5/qwindow.html#fromWinId . anyway I don't see wxNativeWindow can help in this so will keep exploring, Thanks guys for your time. There's a lot of "ifs" in that description - I'm still sk...
by New Pagodi
Thu Apr 04, 2019 12:35 pm
Forum: C++ Development
Topic: wxNativeWindow host app
Replies: 9
Views: 200

Re: wxNativeWindow host app

I don't see any way this could work on macOS. In windows both top level windows and widgets are treated as the same sort of thing. On macOS top level windows and widgets are different things. wxNativeWindow is meant to wrap around the widget type objects - not the top level window type objects.
by New Pagodi
Sun Mar 31, 2019 4:48 pm
Forum: C++ Development
Topic: wxDC don't draw on wxPanel
Replies: 2
Views: 92

Re: wxDC don't draw on wxPanel

You need to handle the paint event.

The UpdateUI event is an entirely different thing that has nothing to do with drawing.