Search found 1583 matches

by catalin
Sat Dec 12, 2020 4:16 pm
Forum: C++ Development
Topic: sorting data with wxVectorSort
Replies: 11
Views: 332

Re: sorting data with wxVectorSort

How did you use it? Show a small code snippet.
The following did sort them in {"2", "3", "11"} order for me:

Code: Select all

    wxSortedArrayString sas(wxNaturalStringSortAscending);

    sas.Add("2");
    sas.Add("11");
    sas.Add("3");
by catalin
Sat Dec 12, 2020 3:56 pm
Forum: C++ Development
Topic: sorting data with wxVectorSort
Replies: 11
Views: 332

Re: sorting data with wxVectorSort

It is most likely sorting values as strings, and it looks correct, even if not very useful when you have numbers.

For numbers, you can just convert string values to numbers and sort them.
Otherwise, if you must have them as strings, try with wxSortedArrayString and one of the sorting functions.
by catalin
Sat Oct 17, 2020 4:51 am
Forum: C++ Development
Topic: residue problem on drawing canvas
Replies: 8
Views: 445

Re: residue problem on drawing canvas

When moving the mouse, draw the XOR-ed lines in the same way you draw the rectangle -- on the memory bitmap, or directly in the OnPaint() handler.. Then just call Refresh(). Painting on the screen should always be done on wxPaintDC, unless you have very particular needs for other DC, and you really ...
by catalin
Sat Oct 17, 2020 4:41 am
Forum: General Development
Topic: licence de wxWidgets et ses obligations
Replies: 23
Views: 1241

Re: licence de wxWidgets et ses obligations

kikilabe wrote:
Fri Oct 16, 2020 6:50 pm
I have a problem understanding wxwindow sometimes i don't understand what it is and the code itself to learn the libraries I analyze the wxwindow examples but sometimes I don't understand the examples
Please open new conversations for different topics.
by catalin
Tue Sep 29, 2020 11:39 pm
Forum: C++ Development
Topic: Restrict Drawing to Image
Replies: 2
Views: 223

Re: Restrict Drawing to Image

See "Clipping region functions" in wxDC docs.
by catalin
Fri Sep 25, 2020 9:43 am
Forum: C++ Development
Topic: Number as text input
Replies: 1
Views: 213

Re: Number as text input

wxSpinCtrl
by catalin
Sun Sep 20, 2020 5:41 pm
Forum: C++ Development
Topic: How do I make a break line in a textctrl?
Replies: 5
Views: 319

Re: How do I make a break line in a textctrl?

One of the parameters of the constructor is style. wxTE_MULTILINE is one of the possible styles.
by catalin
Sun Sep 20, 2020 5:29 pm
Forum: C++ Development
Topic: How do I make a break line in a textctrl?
Replies: 5
Views: 319

Re: How do I make a break line in a textctrl?

First of all, are you using wxTextCtrl or something else?
For the wx component, did you create it as a multi-line control? It has AppendText(), and operator<<(), so you should really be fine with it.
by catalin
Sun Sep 20, 2020 11:39 am
Forum: C++ Development
Topic: wxRichTextCtrl and XRC
Replies: 4
Views: 702

Re: wxRichTextCtrl and XRC

Notice that wxRichTextCtrl support in XRC is available in wxWidgets 2.9.5 and later only and you need to explicitly register its handler using

Code: Select all

#include <wx/xrc/xh_richtext.h>
AddHandler(new wxRichTextCtrl);
to use it.
https://docs.wxwidgets.org/trunk/overvi ... chtextctrl
by catalin
Mon Sep 14, 2020 9:04 am
Forum: General Development
Topic: licence de wxWidgets et ses obligations
Replies: 23
Views: 1241

Re: licence de wxWidgets et ses obligations

Hi Kiba, [You probably won't find many users around here that will answer you in French] You are allowed to create your closed source app with private license, or commercial license, or any other kind, and there is nothing to pay for using wxWidgets. You don't set a type of license in wxAboutDialogI...
by catalin
Tue Aug 18, 2020 11:53 am
Forum: C++ Development
Topic: Showing selection in wxTextCtrl
Replies: 6
Views: 268

Re: Showing selection in wxTextCtrl

Create the wxTextCtrl with wxTE_NOHIDESEL flag.
by catalin
Fri Aug 14, 2020 7:52 am
Forum: Compiler / Linking / IDE Related
Topic: Does anyone successfully working with VLD and wxWidgets?
Replies: 12
Views: 698

Re: Does anyone successfully working with VLD and wxWidgets?

Run your app outside VS and it should tell you which dll-s it cannot find.
by catalin
Wed Aug 12, 2020 11:11 am
Forum: C++ Development
Topic: what does piece of code do?
Replies: 6
Views: 362

Re: what does piece of code do?

GetValue() returns a wxString, which is not [necessarily] a std::string, so some mechanism might be needed for conversion, and using mb_str() is one of them. mb_str() returns wxCharBuffer, which is convertible to char*. If conversion works for you without the call to mb_str(), you might be using wxW...
by catalin
Wed Aug 12, 2020 4:33 am
Forum: C++ Development
Topic: Escape non printable chars in XML
Replies: 9
Views: 468

Re: Escape non printable chars in XML

let's assume I'm confusing the "Unicode" with "utf-16" / "UCS-2". What does this have to do with the title of my post? It was very misleading, including the mix-up with utf-8 representation. How do I escape characters like 0x0500 and 0x0c00 (and some others I have here)? You surely meant 0x000c, bu...
by catalin
Tue Aug 11, 2020 12:50 pm
Forum: C++ Development
Topic: Remove white border from panel inside wxAUINotebook page
Replies: 1
Views: 148

Re: Remove white border from panel inside wxAUINotebook page

FWIW it does look like a bug. The same happens with the latest git sources too.