Hi I'm a beginner in wxwidgets/wxsmith programming,
Thanks to this Awesome forum I was able to create my very first texteditor... My question is how can I be able to edit the filename before it's saved. I tried using the filedialog save property but it jus shows, I input a name and it displays an error.
Please can I get an example of how my user can input the desired file name and directory he so wishes
Here'sand example of how I save hopefully it can be edited and fit in
void textFrame::OnButton3Click(wxCommandEvent& event)
{
Wxstring s(TextCtrl1->GetValue());
Wxfile f("c:\\Fileone.txt",wxFile::write);
f.Write(s);
f.Close();
TextCtrl1->SetValue("Your file's Been saved Successfully")
}
wxfile name dialog Topic is solved
Re: wxfile name dialog
What kind of error did you get? Can you post full code for reproducing?Emerald2240 wrote:I tried using the filedialog save property but it jus shows, I input a name and it displays an error.
Though, there is enough material with examples of using wxFileDialog you can just copy-paste code from there and fit it for your needs.
Documentation - wxFileDialog Class Reference
wxWiki - Writing Your First Application-Common Dialogs
Great. Do you understand each line of the code? Which part is need to be updated?Emerald2240 wrote:Here'sand example of how I save hopefully it can be edited and fit in
-
- Knows some wx things
- Posts: 30
- Joined: Tue Dec 11, 2018 1:38 pm
Re: wxfile name dialog
Thanks! The tutorials were helpful.Kvaz1r wrote:What kind of error did you get? Can you post full code for reproducing?Emerald2240 wrote:I tried using the filedialog save property but it jus shows, I input a name and it displays an error.
Though, there is enough material with examples of using wxFileDialog you can just copy-paste code from there and fit it for your needs.
Documentation - wxFileDialog Class Reference
wxWiki - Writing Your First Application-Common Dialogs
Great. Do you understand each line of the code? Which part is need to be updated?Emerald2240 wrote:Here'sand example of how I save hopefully it can be edited and fit in