summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/button.hxx1
-rw-r--r--vcl/source/control/button.cxx16
2 files changed, 17 insertions, 0 deletions
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index d6690b55f849..fbc34850b2e3 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -201,6 +201,7 @@ public:
void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
const Link& GetToggleHdl() const { return maToggleHdl; }
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
virtual void take_properties(Window &rOther);
};
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 09b70558a881..38bdee46455a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1748,6 +1748,22 @@ Size PushButton::GetOptimalSize(WindowSizeType eType) const
}
}
+bool PushButton::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("has-default")))
+ {
+ WinBits nBits = GetStyle();
+ nBits &= ~(WB_DEFBUTTON);
+ if (toBool(rValue))
+ nBits |= WB_DEFBUTTON;
+ SetStyle(nBits);
+ }
+ else
+ return Control::set_property(rKey, rValue);
+ return true;
+}
+
+
// =======================================================================
void OKButton::ImplInit( Window* pParent, WinBits nStyle )