Search found 47 matches

by Parduz
Tue Mar 05, 2019 4:57 pm
Forum: C++ Development
Topic: How to copy ("clone", "duplicate") wxControls?
Replies: 5
Views: 90

Re: How to copy ("clone", "duplicate") wxControls?

My apologies: I didn't read your question carefully enough. There's a (safe, advisable) way to copy (or clone, or duplicate) an existing wxSomething? wxGenericDirCtrl displays the contents of a dir dynamically. However it doesn't use any sort of custom button. Alternatively you could use wxListCtrl...
by Parduz
Tue Mar 05, 2019 4:20 pm
Forum: C++ Development
Topic: How to copy ("clone", "duplicate") wxControls?
Replies: 5
Views: 90

Re: How to copy ("clone", "duplicate") wxControls?

I use wxCrafter (and I'm pleased to say it has just been open-sourced) which is part of the CodeLite IDE; I'd expect other form-designers will do the same sort of thing though. In it, you'd create a wxStaticText, optionally setting its text. You can tell wxCrafter to duplicate it several times, the...
by Parduz
Tue Mar 05, 2019 4:17 pm
Forum: Component Writing
Topic: wxOptionButtons: how to make an "option group"?
Replies: 3
Views: 235

Re: wxOptionButtons: how to make an "option group"?

Well, some aspects are like the RadioBox, but mine are not radio buttons but graphical ones, and they have not to be in the same container (i mean: they could be on different branches in the hierarchy of a "main" container). So there's not an "itemlist", there's not a "value" of the group. They're m...
by Parduz
Tue Mar 05, 2019 3:22 pm
Forum: Component Writing
Topic: wxOptionButtons: how to make an "option group"?
Replies: 3
Views: 235

wxOptionButtons: how to make an "option group"?

I'm creating some custom buttons for my "kiosk" app. Some of them have to act like the options in an "option group", so when one is selected, all the others ones must be unselected. Also, i may want that in a group at least one option is always active. Inspired by old C++Builder6 similar controls, m...
by Parduz
Tue Mar 05, 2019 3:04 pm
Forum: C++ Development
Topic: How to copy ("clone", "duplicate") wxControls?
Replies: 5
Views: 90

How to copy ("clone", "duplicate") wxControls?

I have to dinamically fill a panel with wxStaticText and custom buttons (derived from wxWindow), one of each for each file i found in a directory. They have to act and looks all the same with the exception of the "caption" text. "Building" them property by property when i new() them is tedious: i'd ...
by Parduz
Thu Feb 28, 2019 8:40 am
Forum: C++ Development
Topic: How to catch all clicks in an area?
Replies: 2
Views: 66

How to catch all clicks in an area?

In my "kiosk" app there's the "long-click" feature: the user touch a area for a second and only after that second i switch to some visualization/page. These "areas" are just wxPanels containing text, labels or bitmaps, the touchscreen is small, so i don't know where the user will touch, and right no...
by Parduz
Fri Feb 08, 2019 8:55 am
Forum: C++ Development
Topic: There a "wx Way" to access USB drives?
Replies: 1
Views: 84

There a "wx Way" to access USB drives?

I'm writing a simple, custom dialog for my "kiosk" app to open files from predefined location. So it will not show the path, or even let you pick another one. It is just a list of files. BUT I'd like to have a button which will be enabled only if there's a pen drive in the USB slot. Problem is: how ...
by Parduz
Thu Feb 07, 2019 5:38 pm
Forum: C++ Development
Topic: wxXML: GetNode by name like GetAttribute?
Replies: 0
Views: 55

wxXML: GetNode by name like GetAttribute?

wx 3.0.4:

There's a way to get a wxXmlNode* by node name, like the GetAttribute does?
There's a reason this is not implemented?
by Parduz
Thu Jan 31, 2019 3:34 pm
Forum: C++ Development
Topic: How to prevent a wxTextCtrl from loosing focus?
Replies: 12
Views: 196

Re: How to prevent a wxTextCtrl from loosing focus?

I'm still not 100% sure how your GUI works, i'll assume something like this: - there are several pages with text controls (any maybe other controls) - in order for a certain function to get executed, all the controls on all pages must have valid data In that case, i would solve it like this: When t...
by Parduz
Thu Jan 31, 2019 3:27 pm
Forum: C++ Development
Topic: How to use wxTextCtrl->EmulateKeyPress?
Replies: 2
Views: 74

How to use wxTextCtrl->EmulateKeyPress?

I've searched for it and read some forum answers ( this in particular ), but i had no success. I have an hardware keyboard connected to my Beaglebone, which i read using i2c, then i convert the i2c_keycode in a wxKeyCode (WXK_ something , you can think at the keys of a numpad, to have an idea, so WX...
by Parduz
Thu Jan 31, 2019 1:06 pm
Forum: C++ Development
Topic: How to prevent a wxTextCtrl from loosing focus?
Replies: 12
Views: 196

Re: How to prevent a wxTextCtrl from loosing focus?

Hi, If the user still needs to either confirm with pressing Enter or deny with pressing ESC, why not leave this and do the check on the (presumably default) button click handler? Or whatever Enter action is handled by. This will be more natural... 'cause (as example) the user could press a "change ...
by Parduz
Tue Jan 29, 2019 2:43 pm
Forum: C++ Development
Topic: How to prevent a wxTextCtrl from loosing focus?
Replies: 12
Views: 196

Re: How to prevent a wxTextCtrl from loosing focus?

It seems to work but handling focus is tricky and what works one one platform may not work on another. Here's the version with CallAfter(): Adding an identical textctrl (all my textctrl behave the same) fires an infinite loop of Set/KillFocus. My solution is to store the pointer to the ctrl that wi...
by Parduz
Tue Jan 29, 2019 1:16 pm
Forum: C++ Development
Topic: How to prevent a wxTextCtrl from loosing focus?
Replies: 12
Views: 196

Re: How to prevent a wxTextCtrl from loosing focus?

Wow, thanks. I'll try your suggestions right now. Btw, I also don't see advantages for user in this behaviour. TBH, I consider such behaviour not only rather unusual but also quite user hostile. This is true, and desired: the app is the control interface (running on a BBB with a touchscreen) for som...
by Parduz
Tue Jan 29, 2019 11:35 am
Forum: C++ Development
Topic: How to prevent a wxTextCtrl from loosing focus?
Replies: 12
Views: 196

How to prevent a wxTextCtrl from loosing focus?

I want that the user can't "leave" a wxTextCtrl until the value inside it is "valid". Which means that what i want is to prevent a wxTextCtrl to loose the Focus, no matter what causes it (mouse, keystrokes). How can i obtain this? *EDIT: While the whole application is a fullscreen app, i don't want ...
by Parduz
Tue Jan 22, 2019 9:37 am
Forum: Compiler / Linking / IDE Related
Topic: Need advice on how to split code for complex forms in more files
Replies: 1
Views: 81

Need advice on how to split code for complex forms in more files

I'm building a complex program wich will run on a BeagleBone, full of pages, subpages, controls and interaction between them. Right my "main UI" file (the program frame) is 6k lines long, and i'm at half of the road. There's all the control events, plus the code for handling events from the underlyi...