Search found 223 matches

by DenDev
Sat Jan 02, 2016 11:24 am
Forum: C++ Development
Topic: wxNotebook pages don't redraw
Replies: 8
Views: 1413

Re: wxNotebook pages don't redraw

What happens if you change the size of the wxPanel upon creation? ... wxPanel *panel = new wxPanel(myNotebook, wxID_ANY, wxDefaultPosition, wxSize(0, 0)); //or wxSize(0, 1) ... I have a similar wxNotebook where pages are added with buttons and I do not experience this issue. Maybe because I always c...
by DenDev
Fri Jan 01, 2016 6:42 pm
Forum: C++ Development
Topic: wxNotebook pages don't redraw
Replies: 8
Views: 1413

Re: wxNotebook pages don't redraw

It's not an issue to declare the sizers before the panel - but the controls in the panel's sizer(s) must be children of the panel and therefore it is an easier workflow to create the sizer(s) after the panel. What happens if you freeze/thaw the notebook while adding the panel? myNotebook->Freeze(); ...
by DenDev
Fri Jan 01, 2016 4:49 pm
Forum: C++ Development
Topic: wxNotebook pages don't redraw
Replies: 8
Views: 1413

Re: wxNotebook pages don't redraw

Can you provide a sample? Normal code would look like: void AddPanel(wxNotebook *book) { //Create panel a child of notebook wxPanel p = new wxPanel(book, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); //Create sizer(s) and add controls wxSizer *sizer = ... //Set the panels sizer & fit...
by DenDev
Thu Dec 31, 2015 6:53 pm
Forum: C++ Development
Topic: ANSI module within Unicode application
Replies: 2
Views: 279

Re: ANSI module within Unicode application

I suppose the blowfish module uses ANSI data types and this means that it will remain ANSI even if used in a unicode application. In order to encrypt unicode strings you should convert them to UTF-8 using wxString::ToUTF8(). When decrypting you can reestablish the unicode string with wxString::FromU...
by DenDev
Thu Dec 31, 2015 11:18 am
Forum: C++ Development
Topic: Exceptions
Replies: 4
Views: 650

Re: Exceptions

You need a debug build of wxWidgets for debugging and a Release build for releases :-)
by DenDev
Tue Dec 22, 2015 2:13 pm
Forum: C++ Development
Topic: wxWebView call C++ function from javascript
Replies: 5
Views: 914

Re: wxWebView call C++ function from javascript

I'm not sure if that is possible because it would yield a security risk. You can however do some other trickery with uri's. If you from JavaScript navigate to uri: "cfunc://func_name?arg1&arg2&arg3" then you can assign a "EVT_WEBVIEW_NAVIGATING" handler to the wxWebView where you can examine uri's p...
by DenDev
Mon Dec 21, 2015 11:32 am
Forum: C++ Development
Topic: Allow dialog to be only opened once, but not modal
Replies: 2
Views: 467

Re: Allow dialog to be only opened once, but not modal

That is not called a dialog, but a tool window. See wxFRAME_TOOL_WINDOW here: http://docs.wxwidgets.org/trunk/classwx_frame.html
by DenDev
Wed Dec 16, 2015 12:50 pm
Forum: C++ Development
Topic: Need Scrolling window that discards old data
Replies: 2
Views: 218

Re: Need Scrolling window that discards old data

Why not use a multiline wxTextCtrl and remove the old lines? void AddText(wxTextCtrls *txtctl, wxString txt, int limit_line_count = 200) { txtctl->AppendText(txt + "\n"); while (txtctl->GetNumberOfLines() > limit_line_count) { int len = txtctl->GetLineLength(0); txtctl->Remove(0, len + 1); } }
by DenDev
Tue Dec 15, 2015 11:22 am
Forum: C++ Development
Topic: wxTreeListCtrl::Refresh() function is not working in LINUX
Replies: 5
Views: 583

Re: wxTreeListCtrl::Refresh() function is not working in LINUX

To me it looks like an issue with the scroll bar not updating properly. What happens if you use wxTreeListCtrl->GetView()->Refresh() or wxTreeListCtrl->GetDataView()->Refresh()?
by DenDev
Mon Dec 14, 2015 6:28 pm
Forum: C++ Development
Topic: wxTreeListCtrl::Refresh() function is not working in LINUX
Replies: 5
Views: 583

Re: wxTreeListCtrl::Refresh() function is not working in LINUX

Refresh() will not update the scroll bar - only redraw the control. Show() & Hide() will not update scrollbar either. What happens if you try to change the size of the control to force a scrollbar update? void ForceScrollBarUpdate(wxTreeListCtrl *tlc) { wxSize s = tlc->GetSize(); s.IncBy(0,1); tlc->...
by DenDev
Wed Dec 02, 2015 12:49 pm
Forum: C++ Development
Topic: Stackoverflow while trying to invoke wxMenu item
Replies: 4
Views: 628

Re: Stackoverflow while trying to invoke wxMenu item

Why are you declaring a new event handler for the menu? Your code is not very usefull as an example since the menu creation and event handler method is not supplied. Heres a short example of how to use wxMenu: //MyHandler is child of wxEvtHandler (wxFrame, wxDialog etc.) MyHandler::Create(...) { wxM...
by DenDev
Wed Nov 25, 2015 11:37 am
Forum: C++ Development
Topic: wxTextCtrl memory access violation when using GetValue
Replies: 6
Views: 772

Re: wxTextCtrl memory access violation when using GetValue

I bet that input_field_ is unassigned when it it called from the code generated by the macro. First I would stop using Connect and change that to Bind instead: Bind(event_type, handler_method, object_that_owns_the_handler_method): http://docs.wxwidgets.org/trunk/classwx_evt_handler.html#a03cc68ca201...
by DenDev
Mon Nov 09, 2015 7:21 pm
Forum: C++ Development
Topic: Using CallAfter(..) function
Replies: 4
Views: 1449

Re: Using CallAfter(..) function

The variable (pair) might have become out of scope at the time Create is called. What about passing a pointer: typedef std::pair<wxString, wxString> StringPair; MyFrame::Create(StringPair *arg) { //Use arg delete arg; } SomeObj::SomeFunc() { StringPair *arg = new StringPair(str1, str2); CallAfter(&M...
by DenDev
Mon Nov 09, 2015 6:28 pm
Forum: C++ Development
Topic: Using CallAfter(..) function
Replies: 4
Views: 1449

Re: Using CallAfter(..) function

Does the following work?

Code: Select all

std::pair<wxString, wxString> pair_arg = std::make_pair(firstSring, secondString);
CallAfter(&MyFrame::Create, pair_arg);
The argument &p of Create requires a variable.
by DenDev
Wed Nov 04, 2015 12:13 pm
Forum: C++ Development
Topic: How to generate toast-type messages
Replies: 2
Views: 696

Re: How to generate toast-type messages

There is no such feature in wxWidgets but you should be able to create it yourself with a wxPopupWindow and a wxTimer.

http://docs.wxwidgets.org/trunk/classwx ... indow.html