Search found 69 matches

by heinermueller
Tue May 14, 2019 10:14 am
Forum: C++ Development
Topic: Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize
Replies: 5
Views: 535

Re: Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize

Hi doublemax, wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) Thanks for the hint - am i expected to calculate the dialog width or can i automate this? Actually i expected that d.Layout(); would take a scrollbar existence/visibility into account and resize the dialogs client size accordingly. Is there ...
by heinermueller
Mon May 13, 2019 4:18 pm
Forum: C++ Development
Topic: Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize
Replies: 5
Views: 535

Re: Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize

Thanks for the parent hint! When i resize the window, it draws and works correctly now. The dialog opens almost with the correct size now. This code sequence: const wxSize desired_client_size(600, 250); d.m_scrolledWindow1->SetSize(desired_client_size); d.m_scrolledWindow1->FitInside(); d.m_mainsize...
by heinermueller
Mon May 13, 2019 10:50 am
Forum: C++ Development
Topic: Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize
Replies: 5
Views: 535

Dynamically add controls into wxFlexGridsizer inside wxScrolledWindow - no resize

Hello Everybody, we add controls into a wxFlexGridSizer which is inside a wxScrolledWindow. When the dialog shows up, it is not resized to a proper size. Dialog creation and setup is like this: dialog_config_mismatch d(nullptr, wxID_ANY, _(warn)); wxFont font(wxNORMAL_FONT->GetPointSize(), wxFONTFAM...
by heinermueller
Sat May 11, 2019 11:45 am
Forum: C++ Development
Topic: [Solved] Dynamically prepend controls into wxFlexGridsizer - no repaint
Replies: 2
Views: 264

Re: Dynamically prepend controls into wxFlexGridsizer - no repaint

Are you sure the prepended items have the correct parent? THAT was the problem! As always, copy and paste was the root of all evil, since when copying auto r1 = new wxRadioButton(this, wxID_ANY, wxT("25X"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); from a wxDialog constructor to the dialog cal...
by heinermueller
Sat May 11, 2019 9:03 am
Forum: C++ Development
Topic: [Solved] Dynamically prepend controls into wxFlexGridsizer - no repaint
Replies: 2
Views: 264

[Solved] Dynamically prepend controls into wxFlexGridsizer - no repaint

Hello everybody, we want to 'fill' a wxFlexGridSizer dynamically. After dialog creation (dialog made with wxFormBuilder) we prepend three controls, one text and two radiobuttons. Then the dialog shows up with a call to d.ShowModal() and the dialog looks like this: https://devicecontext.de/owncloud/i...
by heinermueller
Tue Jun 19, 2018 9:11 am
Forum: C++ Development
Topic: High DPI: Start with wx 3.0 or wait for 3.2?
Replies: 2
Views: 1721

High DPI: Start with wx 3.0 or wait for 3.2?

We want to make our application hi-dpi aware, since many devices are hi dpi already today, e.g. most of the high end laptops and OSX systems and many more. The wxWidgets roadmap states "One of the big planned changes for this 3.2 is better support for high DPI displays, [...] " Does anyone know what...
by heinermueller
Wed Apr 12, 2017 3:39 pm
Forum: C++ Development
Topic: Get Current Keyboard Layout
Replies: 1
Views: 479

Get Current Keyboard Layout

Hi All,

is there a way to get the current keyboard layout of the application, for example "EN(US)", or "EN(GB)" or"DE(DE)". Is this part of the locale?

Best,
Heiner
by heinermueller
Sun Apr 02, 2017 6:02 pm
Forum: C++ Development
Topic: Convert UTF8 to my current encoding Windows-1252
Replies: 3
Views: 897

Re: Convert UTF8 to my current encoding Windows-1252

When i trace into FromUTF8, it does return wxString(wxConvUTF8.cMB2WC(utf8)) which calls size_t wxMBConvUTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const ( now the string is correct with an 'ö' but 16 bit ) Then a wxString is constructed const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *in...
by heinermueller
Sun Apr 02, 2017 3:38 pm
Forum: C++ Development
Topic: Convert UTF8 to my current encoding Windows-1252
Replies: 3
Views: 897

Convert UTF8 to my current encoding Windows-1252

Hi all, i get device names from Windows Audio WASAPI and they are encoded in UTF8, and i want to display them in in a wxChoice. At least one device is written as "Lautsprecher / Kopfhörer" and it should be "Lautsprecher / Kopfhörer" The binary of the char* "Lautsprecher / Kopfhörer" is 4c 61 75 74...
by heinermueller
Tue Nov 22, 2016 12:22 pm
Forum: Platform Related Issues
Topic: wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour
Replies: 4
Views: 1177

Re: wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour

Good point. I have not seen any app that does this, at least not that i am aware of it. It was introduced in the windows build w/o beeing aware that this is not existent in other platforms. We should re-layout this feature. Maybe also wx could emit a warning when a feature is not existent in other p...
by heinermueller
Mon Nov 21, 2016 1:16 pm
Forum: Platform Related Issues
Topic: wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour
Replies: 4
Views: 1177

Re: wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour

Check the menu sample if you can change the color of the menu item. Changing the backgroundcolour is not possible because SetBackgroundColour is not declared for wx 3.1 Cocoa. I checked the link to SO, but i have no real knowledge of cocoa and objective-c. Can i get a handle to the MenuItems NS obj...
by heinermueller
Fri Nov 18, 2016 2:39 pm
Forum: Platform Related Issues
Topic: wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour
Replies: 4
Views: 1177

wx 3.1 Cocoa: wxMenuItem::SetBackgroundColour

Hi,

i saw that wxMenuItem::SetBackgroundColour is only supported under wxMSW port. Does anyone know about a simple alternative?

Best regards,
Heiner
by heinermueller
Sun Nov 13, 2016 11:15 am
Forum: Platform Related Issues
Topic: wxCocoa 3.1: Appended SubMenu and 'Connect'
Replies: 18
Views: 2909

Re: wxCocoa 3.1: Appended SubMenu and 'Connect'

I tried Bind(), it makes no difference. Also, even when i do not Connect() any menu at all, the submenus still call the main frame event handlers.
by heinermueller
Sat Nov 12, 2016 3:45 pm
Forum: Platform Related Issues
Topic: wxCocoa 3.1: Appended SubMenu and 'Connect'
Replies: 18
Views: 2909

Re: wxCocoa 3.1: Appended SubMenu and 'Connect'

Is the code you posted and then I quoted is in the "some_object" class? Yes. The last parameter for Connect() has to be the "eventSink", the variable which points to an object that contains OnPopupClick() function Also yes. As told before, everything works as expected for the main menu, but not for...
by heinermueller
Fri Nov 04, 2016 4:18 pm
Forum: Platform Related Issues
Topic: wxCocoa 3.1: Appended SubMenu and 'Connect'
Replies: 18
Views: 2909

Re: wxCocoa 3.1: Appended SubMenu and 'Connect'

I really have to start reading reading and writing clearly, sorry :D
No, the issue is not solved - i still have to Connect() to sub menus explicitly. But only for this platform. Testing connecting from the frame is difficult, because i generate the sub menus items - and thus the IDs - dynamically.