Search found 162 matches

by Ronald
Sun Apr 05, 2020 6:09 am
Forum: C++ Development
Topic: Can column of wxGridBagSizer expand?
Replies: 3
Views: 234

Re: Can column of wxGridBagSizer expand?

wxGridBagSizer derives from wxFlexGridSizer, so you can use wxFlexGridSizer::AddGrowableCol https://docs.wxwidgets.org/trunk/classwx_flex_grid_sizer.html#a7d22045257180999e3705fbcd5585b6e Nice, it works, thanks. BTW, it actually sets an existing column growable instead of adding a new growable colu...
by Ronald
Sat Apr 04, 2020 8:29 pm
Forum: C++ Development
Topic: Can column of wxGridBagSizer expand?
Replies: 3
Views: 234

Can column of wxGridBagSizer expand?

In the sample code below, when the window resizes, can the 2nd column of wxGridBagSizer fit horizontally? wxBoxSizer * sizer_1 = new wxBoxSizer(wxVERTICAL); { wxGridBagSizer * sizer_2 = new wxGridBagSizer(10, 10); { int row = 0; wxSize path_text_ctrl_size(500, 25); { sizer_2->Add(new wxStaticText(th...
by Ronald
Fri Dec 27, 2019 7:26 am
Forum: General Forum Issues
Topic: Is https://trac.wxwidgets.org/ down?
Replies: 1
Views: 2037

Is https://trac.wxwidgets.org/ down?

I have been unable to visit it for several days.
by Ronald
Sat Dec 07, 2019 4:02 pm
Forum: C++ Development
Topic: How to known lower/upper case letter in EVT_CHAR_HOOK handler
Replies: 1
Views: 237

How to known lower/upper case letter in EVT_CHAR_HOOK handler

In the code below, if press shift+A, it outputs 306(code of shift) and 'A' seperately. What's wanted is key codes like 'a', 'A', '1', '!', etc, any easy way? void MainFrame::OnCharHook(wxKeyEvent & event) { wxChar uc = event.GetUnicodeKey(); if (uc != WXK_NONE) { // It's a "normal" character. Notice...
by Ronald
Wed Oct 30, 2019 7:41 pm
Forum: C++ Development
Topic: text ctrl with a clear button?
Replies: 1
Views: 512

text ctrl with a clear button?

QLineEdit_WithClearButton.png
QLineEdit_WithClearButton.png (1.04 KiB) Viewed 512 times
Any control like this?
Convenient in some case, due to habits.
by Ronald
Mon Oct 28, 2019 11:13 am
Forum: Compiler / Linking / IDE Related
Topic: link failed on Linux
Replies: 4
Views: 733

Re: link failed on Linux

Done.
After add all the other lib dependencies, it still reports errors, rebuild all solve the problem.
by Ronald
Mon Oct 28, 2019 9:48 am
Forum: Compiler / Linking / IDE Related
Topic: link failed on Linux
Replies: 4
Views: 733

Re: link failed on Linux

I've copied the output of `wx-config-gtk3 --libs`, no problem about wx now. This works -lwx_gtk3u_xrc-3.0 -lwx_gtk3u_webview-3.0 -lwx_gtk3u_adv-3.0 -lwx_gtk3u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lwx_gtk3u_aui-3.0 But there are problems by other libs, so I'm not sure. I'll ...
by Ronald
Mon Oct 28, 2019 9:40 am
Forum: Compiler / Linking / IDE Related
Topic: link failed on Linux
Replies: 4
Views: 733

Re: link failed on Linux

doublemax wrote:
Mon Oct 28, 2019 8:46 am
Try adding -lwx_gtk3u_base-3.0 to the list.
/usr/bin/ld: cannot find -lwx_gtk3u_base-3.0
by Ronald
Mon Oct 28, 2019 8:31 am
Forum: Compiler / Linking / IDE Related
Topic: link failed on Linux
Replies: 4
Views: 733

link failed on Linux

/usr/bin/ld: obj/Debug/UI/MainFrame/MainFrame.o: undefined reference to symbol '[email protected]@WXU_3.0' /usr/bin/ld: /usr/lib/libwx_baseu-3.0.so.0: error adding symbols: DSO missing from command line clang-9: error: linker command failed with exit code 1 (use -v to see invocation) link opt...
by Ronald
Mon Oct 21, 2019 3:40 am
Forum: C++ Development
Topic: Is wxWindow::HandleWindowEvent safe for multithreading
Replies: 1
Views: 592

Is wxWindow::HandleWindowEvent safe for multithreading

In working thread call wxWindow::HandleWindowEvent to updtae UI, is it safe?
by Ronald
Wed Oct 16, 2019 9:52 am
Forum: C++ Development
Topic: wxScrolledWindow is slow when scrolling through long text
Replies: 14
Views: 1486

Re: wxScrolledWindow is slow when scrolling through long text

Why if I use event.Skip(false) in an EVT_PAINT, the wxWindow would still get painted normally? Why can't I stop the wxWindow from getting painted in an EVT_PAINT? If the parent window paints on the child window, add style wxCLIP_CHILDREN to the parent. But generally wxCLIP_CHILDREN is used to avoid...
by Ronald
Wed Oct 16, 2019 1:36 am
Forum: C++ Development
Topic: wxScrolledWindow is slow when scrolling through long text
Replies: 14
Views: 1486

Re: wxScrolledWindow is slow when scrolling through long text

How many wxStaticText are there? It could be this unresolved problem: http://trac.wxwidgets.org/ticket/15766 About 10-20, some of them are short texts, some are long... It is also slow on Windows 7, so that ticket might not be related I guess. I agree. Can you show the code? modifed samples/minimal...
by Ronald
Wed Oct 16, 2019 12:04 am
Forum: C++ Development
Topic: wxScrolledWindow is slow when scrolling through long text
Replies: 14
Views: 1486

Re: wxScrolledWindow is slow when scrolling through long text

Another solution, draw the texts in EVT_PAINT handler directly.
It's not hard,faster than wxStaticText that works properly.

However, the probem should be investigated, it may be a bug of efficiency, even related to other controls that is not obvious in common use.
I'll dig it.
by Ronald
Tue Oct 15, 2019 4:10 pm
Forum: C++ Development
Topic: Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?
Replies: 13
Views: 1210

Re: Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?

The "virtuality" happens by deriving from wxGridTableBase and then setting it with wxGrid::SetTable(). https://docs.wxwidgets.org/trunk/classwx_grid_table_base.html#a4233348a081a46dabadb6b2dd2cfb972 It's great. BTW, wxGridTableBase is not as a base class of wxGrid, it's ok, wxGrid is not intended t...
by Ronald
Tue Oct 15, 2019 3:42 pm
Forum: C++ Development
Topic: Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?
Replies: 13
Views: 1210

Re: Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?

Let me repeat it - wxGrid by definition IS virtual. Yes. Just for technic, for example, 10^10 rows * 10^10 columns, common random access may not be efficient enough. Then a sophisticated solution in demand: use multithread to locate the data for displaying most recent used data searched first any o...