Search found 113 matches

by jgrzybowski
Tue Oct 31, 2017 9:11 am
Forum: wxDev-C++
Topic: MCP 2210
Replies: 9
Views: 19488

Re: MCP 2210

wxFTP you can use only if your device MCP2210 is shown in operating system as a COM port. //global objects/variables extern wxBaud baudBaudrate; //baudrate [1200...115200], default is 38400 extern wxString stringDevName; //connected device, default is COM1 extern int intTimeout; //communication time...
by jgrzybowski
Mon Oct 30, 2017 2:59 pm
Forum: wxDev-C++
Topic: MCP 2210
Replies: 9
Views: 19488

Re: MCP 2210

I do not know how to communicate with MCP2210. But my collage has already made communication with some fundino (type of arduino), this device after connection to PC with Windows via USB is recognized as a additional COM port. That is why it is possible to comunicate through wxFTP object. I am not su...
by jgrzybowski
Tue Oct 24, 2017 8:07 am
Forum: C++ Development
Topic: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row
Replies: 8
Views: 2677

Re: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row

I have never tested one object wxGridCellChoiceEditor for all cells, seems to be possible. In this example it is follwoing object: wxArrayString stringTablicaBaudrate; //... stringTablicaBaudrate.Add(wxT("150")); stringTablicaBaudrate.Add(wxT("300")); stringTablicaBaudrate.Add(wx...
by jgrzybowski
Thu Oct 19, 2017 2:49 pm
Forum: C++ Development
Topic: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row
Replies: 8
Views: 2677

Re: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row

I do not use wxGridCellChoiceEditor::IncRef(). In my functions it looks as following void Serial_Com_PLCFrm::PrepareGridControl() { //title gridInfo->SetColLabelValue(0, wxT("Parameter")); gridInfo->SetColLabelValue(1, wxT("Value")); //first row gridInfo->SetRowLabelValue(current...
by jgrzybowski
Wed Oct 18, 2017 3:58 pm
Forum: C++ Development
Topic: decimal separator mismatch in italian
Replies: 2
Views: 1263

Re: decimal separator mismatch in italian

I am not sure, but below is ticket which seems to be the same or very similar problem described:
http://trac.wxwidgets.org/ticket/16610
by jgrzybowski
Wed Oct 18, 2017 3:32 pm
Forum: C++ Development
Topic: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row
Replies: 8
Views: 2677

Re: wxGridCellChoiceEditor causes wxGrid scroll bars to appear on the bottom row

When I activate chioice editor I do not have any scrollbar, but first deafault value in this chioice editor has got text shorter then cell width (see picture ChoiceEditorShown.jpg). After selection horizontal scroll bar is shown (see picture ChoiceEditorHiddenAfterSelection.jpg), because choosen val...
by jgrzybowski
Mon Oct 16, 2017 1:14 pm
Forum: C++ Development
Topic: How do I link the input on textbox content to label and put it on screen?
Replies: 3
Views: 1581

Re: How do I link the input on textbox content to label and put it on screen?

You can just copy value from your text box inside of click button function:
info=TextCtrl1->GetValue();
Regards, jarek
by jgrzybowski
Sat Oct 14, 2017 11:10 am
Forum: C++ Development
Topic: How do I link the input on textbox content to label and put it on screen?
Replies: 3
Views: 1581

Re: How do I link the input on textbox content to label and put it on screen?

You should define EVT_BUTTON, examples are in docs and some simple below: //... BEGIN_EVENT_TABLE(Your_App_Frame_Frm,wxFrame) //... EVT_CLOSE(Your_App_Frame_Frm::OnClose) //... EVT_BUTTON(ID_YOURBUTTON,Your_App_Frame_Frm::buttonYourButtonClick) //... END_EVENT_TABLE() //... /* * buttonYourButtonClic...
by jgrzybowski
Sat Oct 14, 2017 9:06 am
Forum: C++ Development
Topic: Is there a wxGrid floating point editor that can use SI units?
Replies: 1
Views: 853

Re: Is there a wxGrid floating point editor that can use SI units?

I do not know any object ready to use for your application in wxGrid, but it seems to be quiet easy to apply yourself: # You can implement wxGridCellChoiceEditor for first column - so user have to choose one form several correct values (for example units); # You cane use event generated by wxGrid af...
by jgrzybowski
Thu Oct 05, 2017 11:40 am
Forum: C++ Development
Topic: How to use (XML or config) in wxPropertyGrid?
Replies: 3
Views: 1567

Re: How to use (XML or config) in wxPropertyGrid?

Parsing wxXMLDocument is quite easy to apply. Below some simple example - reading COM paramters form XML file into some global variables. I hope it would by helpful. Regards, Jarek bool Serial_Com_PLCFrm::LoadingCOMParametres() { wxXmlDocument Dokument; bool Result = false; if(!Dokument.Load(AdresCo...
by jgrzybowski
Wed Aug 16, 2017 5:34 pm
Forum: C++ Development
Topic: How to get data from a selected item?
Replies: 3
Views: 2318

Re: How to get data from a selected item?

In my projects usually I do it in following way: * Create own object and push into your structure like list/vector; * Insert item in wxListCtrl for this object: long wxListCtrl::InsertItem(long index, const wxString & label); * Function wxListCtrl::InsertItem return ListIndex (long) which you ca...
by jgrzybowski
Tue Jun 13, 2017 3:12 pm
Forum: C++ Development
Topic: Formating the date in the display of wxDatePickerCtrl
Replies: 4
Views: 2078

Re: Formating the date in the display of wxDatePickerCtrl

In wxWidget is also availble object wxCalendar. You can try to replace wxDatePieckerCtrl with: wxStaticText (to show formatted date) plus wxButton (to open separete wxDialog with wxCalendar). Regards, Jarek
by jgrzybowski
Thu Jun 01, 2017 10:00 am
Forum: C++ Development
Topic: Formating the date in the display of wxDatePickerCtrl
Replies: 4
Views: 2078

Re: Formating the date in the display of wxDatePickerCtrl

According to the docs wxDatePickerCtrl use system date format. Perhaps it would be enough OK for you to change date format in oparating system? Regards, Jarek
by jgrzybowski
Wed May 24, 2017 1:14 pm
Forum: C++ Development
Topic: To SelectNone() a wxTextCtrl on startup.
Replies: 3
Views: 1413

Re: To SelectNone() a wxTextCtrl on startup.

Perhaps it is native behaviour of single line text control in operating system. Try to set up for your wxTextCtrl object style: wxTE_MULTILINE. Regards, Jarek
by jgrzybowski
Mon May 22, 2017 3:06 pm
Forum: C++ Development
Topic: Multiline wxTextCtrl event for new line
Replies: 2
Views: 1232

Re: Multiline wxTextCtrl event for new line

You can try to catch change text event (EVT_TEXT) and then read current number of lines: textctrlYourTextCtrl->GetNumberOfLines();
and compare new number of lines with prevoius one (if it has been increased). Regards, Jarek