Search found 56 matches

by elmo
Wed Feb 14, 2007 4:43 pm
Forum: C++ Development
Topic: How to close a dialog from wxInitDialogEvent handler
Replies: 3
Views: 790

in onInit function:

Code: Select all

this->AddPendingEvent(wxCloseEvent())
You've tried something like this?
by elmo
Wed Feb 14, 2007 4:33 pm
Forum: C++ Development
Topic: Problems with Russian letters and EVT_CHAR
Replies: 3
Views: 836

#include <wx/wx.h> #include <wx/progdlg.h> class myApp : public wxApp { public: wxFrame *frame; void OnKeyDown(wxKeyEvent &event); void OnCharDown(wxKeyEvent &event); bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) void myApp :: OnKeyDown(wxKeyEvent &event){ // this is important event....
by elmo
Mon Feb 12, 2007 5:44 pm
Forum: C++ Development
Topic: Problems with Russian letters and EVT_CHAR
Replies: 3
Views: 836

Without any more information it'll be a bit hard to give any advices. Do you process wxEVT_KEY_DOWN?
by elmo
Fri Jan 05, 2007 10:50 pm
Forum: C++ Development
Topic: EVT_GRID_RANGE_SELECT and Veto () ...
Replies: 2
Views: 985

Grid range selection and wxGrid::ClearSelection is kinda funky (at least in wxGTK version 2.6.x, I did not test 2.8 yet). The latter one triggers wxEVT_GRID_RANGE_SELECT which in this case leads to infinite recursion. Solution I found: void participantInformationsPanel::onRangeSelect(wxGridRangeSele...
by elmo
Mon Nov 06, 2006 10:58 am
Forum: C++ Development
Topic: wxChar* to char*
Replies: 2
Views: 915

by elmo
Wed Nov 01, 2006 11:03 pm
Forum: C++ Development
Topic: wxGrid wxNotebook and layout using sizers
Replies: 2
Views: 1115

#include <wx/wx.h> #include <wx/notebook.h> #include <wx/grid.h> class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ wxFrame *frame = new wxFrame(NULL, wxID_ANY, wxT("blah blah")); wxBoxSizer *sizer = new wxBoxSizer( wxHORIZONTAL...
by elmo
Wed Oct 25, 2006 9:46 pm
Forum: C++ Development
Topic: Sqlite3 and wxwidgets callbacks
Replies: 7
Views: 1714

If one or more of the SQL statements are queries, then the callback function specified by the 3rd argument is invoked once for each row of the query result. I think that create table does not return any row -> there is no need to execute callback function. there's also wxSqlite which might make you...
by elmo
Wed Oct 25, 2006 9:03 pm
Forum: C++ Development
Topic: Sqlite3 and wxwidgets callbacks
Replies: 7
Views: 1714

int sqlite3_exec( sqlite3*, /* An open database */ const char *sql, /* SQL to be executed */ sqlite_callback, /* Callback function */ void *, /* 1st argument to callback function */ char **errmsg /* Error msg written here */ ); Use the fourth argument to pass the pointer. I.e. static int Callback(v...
by elmo
Wed Oct 25, 2006 8:53 am
Forum: C++ Development
Topic: Position ComboBox
Replies: 5
Views: 895

http://wxwidgets.org/manuals/2.6.3/wx_s ... eroverview
A bit hard at first (at least for me was), but after you get used to it works nicely.
by elmo
Wed Oct 25, 2006 8:50 am
Forum: C++ Development
Topic: long computational background jobs:threads or update or...??
Replies: 4
Views: 990

sylvaticus wrote:ok, I have solved giving to the frame(GUI) a pointer to the application(MyApplication) in the constructor and then calling after each log activity
You can just use the global ::wxTheApp pointer (this is set by wxWidgets).
by elmo
Tue Oct 24, 2006 7:04 am
Forum: C++ Development
Topic: wxEvtHandler->Disconnect()
Replies: 2
Views: 682

http://forums.wxwidgets.org/viewtopic.p ... highlight=
(Look at the last two posts)
To put it shortly: when you disconnect event data passed in the third argument is deleted (in your case it happens at least twice, but you do it probably for the third time manually).
by elmo
Sun Oct 22, 2006 9:10 pm
Forum: C++ Development
Topic: How to design a progress bar with wxWidgets?
Replies: 3
Views: 3988

Re: How to design a progress bar with wxWidgets?

does some lengthy computation, and I want to have a progress bar. Is there an example on this? #include <wx/wx.h> #include <wx/progdlg.h> class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ int i, max = 433; wxFrame* frame = new ...
by elmo
Fri Oct 06, 2006 3:23 pm
Forum: C++ Development
Topic: Close App clicking OK button in a wxMessageDialog
Replies: 1
Views: 496

#include <wx/wx.h> class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ wxFrame* frame = new wxFrame(NULL, wxID_ANY, wxT("blah blah")); this->SetTopWindow(frame); wxMessageDialog* dialog = new wxMessageDialog(frame, wxT("Should I ...
by elmo
Wed Oct 04, 2006 6:52 pm
Forum: C++ Development
Topic: why am i getting a Huge exe ?
Replies: 11
Views: 2480

Yes, it is normal on Windows. Visual C++ probably uses libraries which are by default with Windows.
by elmo
Wed Oct 04, 2006 10:47 am
Forum: C++ Development
Topic: Deleting Rows on a Grid
Replies: 7
Views: 1951

If you have ten rows: n = 0 -> delete row 0 and now grid has 9 rows n = 1 -> delete row 1 and now grid has 8 rows n = 2 -> delete row 2 and now grid has 7 rows n = 3 -> delete row 3 and now grid has 6 rows n = 4 -> delete row 4 and now grid has 5 rows n = 5 -> delete row 5 which does not exist (we h...