Hi! I tried to use wxMessageBox in my developement, but seem it does'not show the title(capture), only the message.
int la = wxMessageBox(fmessage, ftitle, (wxYES_NO | wxCANCEL));
then i tried to use
wxMessageDialog ld(fpar,fmessage,ftitle,wxICON_QUESTION|wxYES_NO|wxCANCEL)
lres = ld.ShowModal();
but it also doesnot show the caption.
and finally i used -
wxMessageDialog ld(fpar,ftitle,fmessage,wxICON_QUESTION|wxYES_NO|wxCANCEL);
ld.SetExtendedMessage(fmessage); //!!!
lres = ld.ShowModal();
and it works.
so to have shown caption and message both, I use - ld.SetExtendedMessage(fmessage);
So..what is it? Bug or some misunderstanding of documentation?
Thanks, alex.
Smth wrong with wxMessageDialog?
-
- Super wx Problem Solver
- Posts: 329
- Joined: Tue Oct 18, 2016 2:31 pm
Smth wrong with wxMessageDialog?
ubuntu 20.04, wxWidgets 3.2.1
-
- Moderator
- Posts: 19164
- Joined: Fri Apr 21, 2006 8:03 pm
- Location: $FCE2
Re: Smth wrong with wxMessageDialog?
This is most likely another Ubuntu "specialty".
Use the source, Luke!
-
- Super wx Problem Solver
- Posts: 329
- Joined: Tue Oct 18, 2016 2:31 pm
-
- Super wx Problem Solver
- Posts: 282
- Joined: Tue Mar 19, 2013 8:52 pm
Re: Smth wrong with wxMessageDialog?
This is a little strange because I use wxMessageBox in almost exactly the same way as your first example on Ubuntu 14.04 and it works fine!
For example, the following:
Behaves exactly as expected with the caption "Confirm".
The only difference is that I am using wxWidgets trunk. There is this ticket, but I am not sure if it is related.
Edit: Sorry, I also meant to ask if you are using the standard Unity desktop or another desktop or theme?
For example, the following:
Code: Select all
int response = wxMessageBox(msg, "Confirm", selection.size() > 1 ? (wxYES_NO | wxCANCEL) : wxYES_NO);
if (response == wxYES)
{
....
The only difference is that I am using wxWidgets trunk. There is this ticket, but I am not sure if it is related.
Edit: Sorry, I also meant to ask if you are using the standard Unity desktop or another desktop or theme?
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
-
- Super wx Problem Solver
- Posts: 329
- Joined: Tue Oct 18, 2016 2:31 pm
Re: Smth wrong with wxMessageDialog?
sorry! I did not see your post.iwbnwif wrote:This is a little strange because I use wxMessageBox in almost exactly the same way as your first example on Ubuntu 14.04 and it works fine!
For example, the following:
Behaves exactly as expected with the caption "Confirm".Code: Select all
int response = wxMessageBox(msg, "Confirm", selection.size() > 1 ? (wxYES_NO | wxCANCEL) : wxYES_NO); if (response == wxYES) { ....
The only difference is that I am using wxWidgets trunk. There is this ticket, but I am not sure if it is related.
Edit: Sorry, I also meant to ask if you are using the standard Unity desktop or another desktop or theme?
i'm using ubuntu 14.04, BUT with gnome-shell desktop. May be it matters, because some key features are still not working in my code, despite i had tried a lot of tricks.
Last edited by alys666 on Tue Nov 15, 2016 8:43 pm, edited 1 time in total.
ubuntu 20.04, wxWidgets 3.2.1
-
- Super wx Problem Solver
- Posts: 329
- Joined: Tue Oct 18, 2016 2:31 pm
Re: Smth wrong with wxMessageDialog?
yes. i entered the Unity session and everything is correct, so i do not need my "hack". Here Gnome_Shell is the reason.
added: more correct info - there was something wrong with my gnome-shell. when i tested the bug in Unity, and have not it found, and since i changed themes in Unity Tweaks, -> when I returned to Gnome Shell session - bug disappeared over there too. So my Gnome Shell was in some strange state, cured by Unity session.
added: more correct info - there was something wrong with my gnome-shell. when i tested the bug in Unity, and have not it found, and since i changed themes in Unity Tweaks, -> when I returned to Gnome Shell session - bug disappeared over there too. So my Gnome Shell was in some strange state, cured by Unity session.
ubuntu 20.04, wxWidgets 3.2.1