I am using a file picker control to allow the user to select a base directory and want to be able to allow the user to specify a, possibly non-existent, directory at that level.
As there seems to be only one event generated for both initial selection as well as for every key stroke from the user, I was wondering what criteria I might be able to use to sort out which it was?
The issue arises because I want to allow the user to specify the directory via some predefined macros, such as {date} or {user} which will eventually be expanded to the current date, or the log in name for the user.
At this point I would like to verify that the entered data either specifies a valid macro or directory name, hence my attempts to 'classify' the input.
Any hints or pointers?
TIA
wxFileDirPickerEvent Topic is solved
wxFileDirPickerEvent
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: wxFileDirPickerEvent
Am not sure if I understand the question. But what about checking if there is a macro in that path? I mean if you have few macros you can push them in wxArrayString and do check like
Check if wxFileName class have anything that can help in your endevour
HTH
Code: Select all
for(auto macro : macroList)
{
if(path.Contains(macro))
{
//do your thing here
}
}
HTH
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: wxFileDirPickerEvent
Yes, I can check that once the user presses Enter of otherwise finishes entry; I wanted to catch any errors before that.
The only way I see at present is to use a validator for the text field. It gives me an event for every key pressed.
Still working on that, so I'll have to see if that gives me what I need.
The only way I see at present is to use a validator for the text field. It gives me an event for every key pressed.
Still working on that, so I'll have to see if that gives me what I need.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: wxFileDirPickerEvent
In that case you can use GetTextCtrl() and bind it to whatever event suits you (Seems like you need TEXT_UPDATED event). It gives you more control!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: wxFileDirPickerEvent
That is where I am at.
Just have to now implement the necessary logic
Just have to now implement the necessary logic
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2