wxSkin, issue with modal dialogs

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

wxSkin, issue with modal dialogs

Post by spectrum » Thu Oct 22, 2009 9:08 am

Hi all,

maybe someone or <<upCase>> can help me,

when i do a wxDialog::ShowModal from a wxSkinSimpleFrame, the OnPaint seem not working/processed anymore, buttons and skin controls in the wxSkinSimpleFrame below the dialog are no more updated, even if they get immediatly updated at dialog close.

Am i doing something wrong, skin initialization has been done as in the samples.

thanks,
angelo
spectrum

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: wxSkin, issue with modal dialogs

Post by upCASE » Thu Oct 22, 2009 1:57 pm

Hi!
spectrum wrote:Am i doing something wrong, skin initialization has been done as in the samples.
I guess not. The problem is that the modal dialog is blocking the event. I'm not really sure how to fix this, to be honest.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum » Fri Oct 23, 2009 7:10 am

hi upcase,
thanks for the reply,

it is strange, what i see is that for example, after a wxDialog::ShowModal, wxIdleEvent of the main wxSkinSimpleFrame is not blocked but is still received in the connected wxSkinSimpleFrame::OnIdle()

Also, the wxSimpleFrame bmp skin seems correctly redrawned moving the modal dialog over it, but the wxSkinButton's child of it are not redrawn.

Let me know if i can give any help.
spectrum

spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum » Fri Nov 20, 2009 8:14 am

Hello,

seems i found the issue:
wxSkinWindow::OnPaint check for IsEnabled(), and when a modal dialog is issued over, this return false, becouse the keys input is disabled. So the routine redraw using the "disabled" bitmap.
Problems i see here are:
1)since is possible (as in my case) that some "disabled" bitmap is missing, the redrawing is messed up. Also, on iconize and maximize buttons, even if specified, the xml "disbled" bitmap seems not used (think this can be fixed easily).
2)after the modal dialog is shown, under windows, a full redraw of the buttons should be forced, since they change state only moving the dialog over them.
3) normally, on windows, when a modal windows is issued, buttons on the frames below get automaticcally diabled, but the graphic stay as enabled. Maybe becouse there is no disabled bitmap ?

I am actually looking for the best fix for my purpose, then i will post back.
spectrum

Post Reply