Search found 114 matches
- Wed Jan 24, 2018 7:51 pm
- Forum: C++ Development
- Topic: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
- Replies: 7
- Views: 1427
- Wed Jan 24, 2018 6:06 pm
- Forum: C++ Development
- Topic: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
- Replies: 7
- Views: 1427
Re: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
At this point, I'm thinking only to use validators for screening user input not for data transfer between model and gui. It seems way easier and less code/complexity to do everything via event handling functions. But, I want to explore wxValidators before getting into that, so I least know what they...
- Wed Jan 24, 2018 5:17 am
- Forum: C++ Development
- Topic: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
- Replies: 7
- Views: 1427
Re: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
Hi, I presume you are trying it on Windows? What version of the library do you use? Is wxListBox on the dialog/panel or on the wxFrame? Is this assert thrown during initialization or it starts fine and you are selecting something? wxWidgets(v3.0.3) - Vs2015(v14) - Win7(x64). wxListBox on the dialog...
- Tue Jan 23, 2018 11:03 pm
- Forum: C++ Development
- Topic: wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
- Replies: 7
- Views: 1427
wxListBox->SetValidator( wxGenericValidator(wxArrayInt *valPtr) ) | Runtime issues
I'm having some trouble understanding how wxGenericValidator and wxListBox work together. Hopefully this simplifies the actual code to the pertinent and the issue is clear. View/Ctrl: ------------ Strings/args for wxListBox constructor. So we can see when wxListBox has updated. wxArrayString itemLis...
- Thu Jan 11, 2018 7:37 pm
- Forum: C++ Development
- Topic: wxTextValidator: View not updating
- Replies: 10
- Views: 2490
Re: wxTextValidator: View not updating
Can you elaborate on this?PB wrote: TBH, I am not sure that your implementation of the model/view is the optimal one.
- Thu Jan 11, 2018 7:33 pm
- Forum: C++ Development
- Topic: wxTextValidator: View not updating
- Replies: 10
- Views: 2490
Re: wxTextValidator: View not updating
The first time I made this App I'm almost certain I didn't have to use: this->TransferDataToWindow(); to update the View Control, and somehow the View Control just magically updated every time the Model updated I am rather sure this could never work, there is no way to update the control from the &...
- Wed Jan 10, 2018 8:58 pm
- Forum: C++ Development
- Topic: wxTextValidator: View not updating
- Replies: 10
- Views: 2490
Re: wxTextValidator: View not updating
I just realised and updated, its wxDialog.
Is there a good way to post the project folder?
Is there a good way to post the project folder?
- Wed Jan 10, 2018 6:41 pm
- Forum: C++ Development
- Topic: wxTextValidator: View not updating
- Replies: 10
- Views: 2490
Re: wxTextValidator: View not updating
I'm still digesting the replies, ...but maybe this pic will clarify things?
wxDialog: ID_MAIN_PANEL
wxDialog: ID_MAIN_PANEL
- Tue Jan 09, 2018 7:10 pm
- Forum: C++ Development
- Topic: wxTextValidator: View not updating
- Replies: 10
- Views: 2490
wxTextValidator: View not updating
I made a simple app to express the Model-View-Controller concept. Capture.PNG 1) Panel with 2 wxTextCtrl objects. --------------------------------------- The 1st wxTextCtrl allows a user to update Model variable by inputting a string. The 2nd wxTextCtrl allows no input, it displays the current state...
- Sat Dec 16, 2017 8:50 pm
- Forum: C++ Development
- Topic: Best practice: Linking GUI to function code.
- Replies: 6
- Views: 2023
- Thu Dec 14, 2017 10:09 pm
- Forum: C++ Development
- Topic: Best practice: Linking GUI to function code.
- Replies: 6
- Views: 2023
Re: Best practice: Linking GUI to function code.
I'm probably not being clear, my question is more about how the GUI layer and function layer should connect. We cant just randomly use a vector, ...in my example the list_manager class has to interact with the GUI class and vice versa. I'm asking for the best way to link the two? ...for eg, the GUI ...
- Thu Dec 14, 2017 9:30 pm
- Forum: C++ Development
- Topic: Best practice: Linking GUI to function code.
- Replies: 6
- Views: 2023
Best practice: Linking GUI to function code.
Lets say we have... 1) A really simple class which takes strings and stores them in a kind of list, ...lets call the class: list_manager . 2) A GUI consisting of a text box and list box on a panel. What is the usual practice for connecting the two, so they can elegantly interact with each other? Sho...
- Thu Dec 14, 2017 8:18 pm
- Forum: C++ Development
- Topic: How to ref panel objects on event?
- Replies: 3
- Views: 1006
Re: How to ref panel objects on event?
Thanks!!!
- Wed Dec 13, 2017 9:06 pm
- Forum: C++ Development
- Topic: How to ref panel objects on event?
- Replies: 3
- Views: 1006
How to ref panel objects on event?
On PANEL init, a wxTextCtrl(text input field) object is created: void PANEL::Init() { wxTextCtrl* itemTextCtrl = new wxTextCtrl( itemStaticBoxSizer11->GetStaticBox(), ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(400, -1), wxTE_PROCESS_ENTER ); } We set an event on the text field...should us...
- Wed Nov 22, 2017 6:15 pm
- Forum: Compiler / Linking / IDE Related
- Topic: vc++ project template?
- Replies: 11
- Views: 2647
Re: vc++ project template?
Will check the rest tomorrow and report back.
-----
The template feature doesn't appear fit for this purpose.
Why so difficult to create new wx projects ...what am I missing here?
-----
The template feature doesn't appear fit for this purpose.
Why so difficult to create new wx projects ...what am I missing here?