mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-02 22:28:14 +00:00
[idd] helper/CEditWidget: support enable/disabling edit controls
This commit is contained in:
@@ -24,6 +24,11 @@ int CEditWidget::getNumericValue()
|
|||||||
return std::stoi(getValue());
|
return std::stoi(getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CEditWidget::enable(bool enabled)
|
||||||
|
{
|
||||||
|
return Edit_Enable(m_hwnd, enabled);
|
||||||
|
}
|
||||||
|
|
||||||
void CEditWidget::setValue(const std::wstring &value)
|
void CEditWidget::setValue(const std::wstring &value)
|
||||||
{
|
{
|
||||||
if (!Edit_SetText(m_hwnd, value.c_str()))
|
if (!Edit_SetText(m_hwnd, value.c_str()))
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ public:
|
|||||||
std::wstring getValue();
|
std::wstring getValue();
|
||||||
int getNumericValue();
|
int getNumericValue();
|
||||||
|
|
||||||
|
bool enable(bool enabled = true);
|
||||||
|
bool disable() { return enable(false); }
|
||||||
void setValue(const std::wstring &value);
|
void setValue(const std::wstring &value);
|
||||||
void setNumericValue(int value);
|
void setNumericValue(int value);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user