ccbuluo / duilib

Automatically exported from code.google.com/p/duilib
0 stars 0 forks source link

Slider 在disable的状态下仍然可以通过鼠标点击来改变value #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
解决方法:

在Doevent里面 ButtonUP事件中加个判断. 如下:

if( event.Type == UIEVENT_BUTTONUP )
{
    int nValue;
    if( (m_uButtonState & UISTATE_CAPTURED) != 0 ) {
        m_uButtonState &= ~UISTATE_CAPTURED;
    }
    //fix bug: disable control is not working by ReadBai
    if( !IsEnabled() )
        return;

        .....

Original issue reported on code.google.com by pro...@gmail.com on 27 Feb 2014 at 3:46