Search found 12194 matches

by doublemax
Sat May 26, 2018 11:09 pm
Forum: C++ Development
Topic: wxSlider::SetValue(); - No events wanted!
Replies: 2
Views: 29

Re: wxSlider::SetValue(); - No events wanted!

Some controls have a dedicated method for this, e.g. ChangeValue() vs SetValue() in wxTextCtrl. But wxSlider does not, so you have to implement a solution in your code. In many cases it's enough to only call SetValue() if the (new) value differs from the current value. But it depends on the conditio...
by doublemax
Sat May 26, 2018 12:59 pm
Forum: C++ Development
Topic: Sizer/panel padding
Replies: 1
Views: 21

Re: Sizer/panel padding

When using sizers there's a parameter for the border width and flags which determine on which side to apply the border.

If you're using a GUI editor, these options should be somewhere, too.

http://neume.sourceforge.net/sizerdemo/
by doublemax
Sat May 26, 2018 7:46 am
Forum: C++ Development
Topic: Assert "bitmap.IsOk()" failed in SetImage(): invalid bitmap for wxToolBar icon
Replies: 1
Views: 26

Re: Assert "bitmap.IsOk()" failed in SetImage(): invalid bitmap for wxToolBar icon

I can't tell you how to do it in formbuilder, but you have to assign a bitmap for the toolbar item. It can't be empty.
by doublemax
Fri May 25, 2018 8:59 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

I see. Unfortunately as I have a variable number of rows, I end up with a lot of extra space.
Just recalculate the minimum size each time the number of rows changes and do a Layout().
by doublemax
Fri May 25, 2018 8:47 pm
Forum: C++ Development
Topic: Tabbing out of derived wxScrolledWindow doesn't work [SOLVED]
Replies: 2
Views: 53

Re: Tabbing out of derived wxScrolledWindow doesn't work [SOLVED]

Without having tested it, the most obvious difference is the wxWANTS_CHARS flag that you're using for the derived class. Just deriving from wxScrolledWindow should not make any difference at all.
by doublemax
Fri May 25, 2018 8:45 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

Do you happen to have a link on how BestSize (and InitialSize) are used by wxWidgets when doing dynamic layouts? Not really, only this: http://docs.wxwidgets.org/trunk/overview_sizer.html But there is not much to know anyway. All controls have 3 sizes that are used by the sizer algorithm: A "b...
by doublemax
Fri May 25, 2018 7:05 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

I simply don't understand why the sizer isn't taking into account the scrollbar height when it's being laid out. It's not the sizer's fault. wxGrid reports a "best size", that's the size needed to display everything without scrollbars. The problem in your case is that the content fits in ...
by doublemax
Fri May 25, 2018 6:43 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

Does GetDefaultRowSize() adjust for font size?
Probably not. But if you have so few rows, you can get each individual row height with wxGrid::GetRowSize ( row ).
by doublemax
Fri May 25, 2018 6:34 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

How many items does the grid typically have? Maybe you can calculate and set a reasonable minimum height based on wxGrid::GetDefaultRowSize().
by doublemax
Fri May 25, 2018 6:05 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

How about adding the wxALWAYS_SHOW_SB style flag as a workaround?
by doublemax
Fri May 25, 2018 5:35 pm
Forum: C++ Development
Topic: wxGrid and wxSizer issue [SOLVED]
Replies: 15
Views: 93

Re: wxGrid and wxSizer issue [SOLVED]

Can you try to create a small, compilable sample or at least show a screenshot? Probably unrelated, but still worth mentioning: Flags like wxALIGN_LEFT or wxALIGN_RIGHT make no sense in a horizontal(!) boxsizer. In newer wxWidgets version this should have caused an assert. Which wxWidgets version ar...
by doublemax
Fri May 25, 2018 5:24 pm
Forum: C++ Development
Topic: Error with creating a tab in wxAuiNotebook
Replies: 13
Views: 144

Re: Error with creating a tab in wxAuiNotebook

For clarity, what is the technical difference between SetSizerAndFit() and SetSizer() I think that's pretty well explained in the doc: http://docs.wxwidgets.org/trunk/classwx_window.html#a29938af9828fd35da666536cdfb6b73c ...and is this size information ever communicated to its parent? Not directly....
by doublemax
Fri May 25, 2018 4:59 pm
Forum: C++ Development
Topic: wxWidgets 3.1.1 and german letters
Replies: 21
Views: 381

Re: wxWidgets 3.1.1 and german letters

Ok, that means that the string data already lies UTF8 encoded in memory. This is the actual underlying cause of your problem. But i still don't know how this can happen. If should only happen if the source file is encoded in UTF8, but the compiler ignores this and interprets it as ISO8859-1 (or any ...
by doublemax
Fri May 25, 2018 7:30 am
Forum: C++ Development
Topic: Error with creating a tab in wxAuiNotebook
Replies: 13
Views: 144

Re: Error with creating a tab in wxAuiNotebook

Change SetSizerAndFit to SetSizer. //this->SetSizerAndFit(sizer); this->SetSizer(sizer); SetSizerAndFit only makes sense if "this" is a toplevel window like a wxFrame or wxDialog. Although i have to admit that i'm not sure why that leads to a crash, but i was too lazy to research it any fu...
by doublemax
Fri May 25, 2018 6:59 am
Forum: C++ Development
Topic: wxWidgets 3.1.1 and german letters
Replies: 21
Views: 381

Re: wxWidgets 3.1.1 and german letters

Can you show a memory view of the string literal when you use the wxT() macro?

It should look like this:
vs_string_literal.png
vs_string_literal.png (24.19 KiB) Viewed 47 times

Go to advanced search