Somethig about setEnabled(false) ?

Help and discussion regarding skinning, themes, and other artistic content.

Moderators: CEGUI MVP, CEGUI Team

ogre2012
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Mar 23, 2011 07:55

Somethig about setEnabled(false) ?

Postby ogre2012 » Wed Apr 27, 2011 03:03

I have create a window which type is "Slider". And I want to this window can't receive any event from mouse cursor. So i use the "setEnabled(false)".
Maybe it make the function true successfully. But I find that the colour of the window become dim.

How to keep the original colour if I want to use the "setEnabled(false)"?
Or can you tell me another way that the window can't receive any mouse course's event?
Thank you very much!

ogre2012
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Mar 23, 2011 07:55

Re: Somethig about setEnabled(false) ?

Postby ogre2012 » Thu Apr 28, 2011 02:42

ogre2012 wrote:I have create a window which type is "Slider". And I want to this window can't receive any event from mouse cursor. So i use the "setEnabled(false)".
Maybe it make the function true successfully. But I find that the colour of the window become dim.

How to keep the original colour if I want to use the "setEnabled(false)"?
Or can you tell me another way that the window can't receive any mouse course's event?
Thank you very much!


I have solved this problem.I create another child window which has the same size with the parent window.And the child window is 'blank' image . Such as :
mNoneLabel is StaticImage type.
mNoneLabel->setProperty(_T("UnifiedAreaRect"),_T("{{0.0,0},{0.0,0.0},{1.0,0.0},{1.0,0.0}}"));
mNoneLabel->setProperty(_T("Image"), _T(""));

So the parent window can't receive any event from mouse cursor.


Return to “Skins and Themes”

Who is online

Users browsing this forum: No registered users and 6 guests