Search found 49 matches

by Big_Lebowski
Thu Sep 01, 2016 6:36 pm
Forum: C++ Development
Topic: Combined GUI console app
Replies: 11
Views: 1866

Re: Combined GUI console app

There is a sample in my wxdistrib "wxWidgets-3.1.0/samples/docview" you can launch executable from command line
"Usage: docview [--{mdi,sdi,single}] "
by Big_Lebowski
Fri Jul 22, 2016 6:54 pm
Forum: wxWidgets Development (Russian)
Topic: Не отображаются русские символы
Replies: 3
Views: 1460

Re: Не отображаются русские символы

Нужно добавить в класс производный от wxApp
wxLocale m_locale;
m_locale.Init(wxLANGUAGE_RUSSIAN);
by Big_Lebowski
Fri Jul 08, 2016 7:16 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

Re: wxGridTableBase rounds float values.

You must have written the code that writes into DBF and reads from it. So you must know where exactly the data gets lost. An unmodified wxGridTableBase only knows about strings, it does not know about any other datatype. Probably, but if I write float into DBF without wxGrid-wxGridTableBase chain, ...
by Big_Lebowski
Fri Jul 08, 2016 6:06 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

Re: wxGridTableBase rounds float values.

ONEEYEMAN wrote:Big_Lebowski,
Is the wxGridTableBase field a double or int?

Thank you.
DBF-field double, but wxGridTableBase field is wxString
by Big_Lebowski
Fri Jul 08, 2016 4:42 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

Re: wxGridTableBase rounds float values.

Big_Lebowski, Also, is it only wxGrid, i.e. visual problem or the data in the database is also stored incorrectly? Thank you. If put float into DBF-file record via wxGrid-wxGridTableBase it truncate value. If I put float from wxTextCtrl to DBF-file record (without wxGrid-wxGridTableBase) it works OK.
by Big_Lebowski
Fri Jul 08, 2016 4:39 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

Re: wxGridTableBase rounds float values.

I think you have to trace into the grid code and find out where exactly the floats are truncated. There are many places where it can go wrong. If I add wxLogMessage("dvalue: %f ", dvalue); into SetValue it show NOT truncated float-value, but in wxGrid and in DBF-file the value truncated. It just wi...
by Big_Lebowski
Fri Jul 08, 2016 4:01 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

Re: wxGridTableBase rounds float values.

Sounds like a locale problem. What happens if you enter "376,56" ("," instead of ".") ? If I set m_grid1->SetColFormatFloat(i, 4, 2); I can't enter comma, but if I comment SetColFormatFloat I can enter "," but it doesn't round value, just cut it. In My wxApp class I set m_locale.Init(wxLANGUAGE_RUS...
by Big_Lebowski
Fri Jul 08, 2016 3:36 pm
Forum: C++ Development
Topic: wxGridTableBase rounds float values.
Replies: 10
Views: 957

wxGridTableBase rounds float values.

Hi all! I have my derived class from wxGridTableBase, I read datas from DBF-file and load it to my wxGridTableBase-derived class and edit the datas through wxGrid. Integer and string values are editing OK, but float values round decimal figures after point, i.e if I enter to wxGrid's cell 376.56 it ...
by Big_Lebowski
Sat Sep 05, 2015 2:58 pm
Forum: C++ Development
Topic: How to move DC-drawn object?
Replies: 4
Views: 546

Re: How to move DC-drawn object?

doublemax wrote: Maybe you're looking for something like this:
http://sourceforge.net/projects/wxsf/
http://www.wxart2d.org/cgi-bin/moin.cgi
Ohh thank you doublemax, it's exactly what I looked for...
by Big_Lebowski
Sat Sep 05, 2015 2:33 pm
Forum: C++ Development
Topic: How to move DC-drawn object?
Replies: 4
Views: 546

Re: How to move DC-drawn object?

But, how did it realize in so called report designers(builders-constructors...), where there is a lot of shapes to create reports? Say... table of sales for a month, it has lines, headers, body, footers and another shapes... Does it redraw everything? It seems to me very complicated solution.
by Big_Lebowski
Sat Sep 05, 2015 12:15 pm
Forum: C++ Development
Topic: How to move DC-drawn object?
Replies: 4
Views: 546

How to move DC-drawn object?

Hi all!

I created say... line or circle using wxDC (for example like here: https://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC ), then I'd like to move that line or circle to the right by using mouse or programmatically. How can I get DC-drawn object to change x-y values?

Thanks in advance.
by Big_Lebowski
Sun Oct 14, 2012 1:56 pm
Forum: C++ Development
Topic: How to sort wxWindowList elements?
Replies: 2
Views: 1686

Re: How to sort wxWindowList elements?

Ha-ha :D thank you doublemax ! You are genius! It works :D
by Big_Lebowski
Sun Oct 14, 2012 11:24 am
Forum: C++ Development
Topic: How to sort wxWindowList elements?
Replies: 2
Views: 1686

How to sort wxWindowList elements?

Hi all ! I'm trying to sort wxWindowList elements (by height) but my program crashes. I have parent wxWindow and it has 6 children (wxWindow-derived custom controlls - wxCustomButton, actually I borrowed custom-controll-sample from http://wiki.wxwidgets.org/Painting_your_custom_control ). In my "Sor...
by Big_Lebowski
Wed May 26, 2010 10:48 am
Forum: C++ Development
Topic: wxXmlNode how to dynamically write Content of Node?
Replies: 2
Views: 508

for (int i = 0; i < 3; i++) { wxString value; value << i; // First Create a element node wxXmlNode *colnNode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("column")); // Then create the TEXT wxXmlNode *colnValue = new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, value); // Add add them colnNode->AddChild(co...
by Big_Lebowski
Tue May 25, 2010 3:42 pm
Forum: C++ Development
Topic: wxXmlNode how to dynamically write Content of Node?
Replies: 2
Views: 508

wxXmlNode how to dynamically write Content of Node?

Hello wxCommunity I can't to get how to write content of node dynamically? I have this code: wxXmlDocument doc; wxXmlNode *documentnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("document")); wxXmlNode *listnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("list")); wxXmlNode *gridnode = new wxXmlNode(wxXM...