I need to create a button that has the same style as ButtonSpec
with its type set to Context
, is there any way to create a ButtonSpec
that isn't directly attached to another control, or have I missed a simple style option on another control?
views:
119answers:
1
+2
A:
You cannot get a standalone ButtonSpec but you do not need one. Create a KryptonButton and then set the ButtonStyle to be ButtonSpec and it will draw in the same way as a ButtonSpec that is present in other controls. You could use a KryptonDropButton if you need it to show a KryptonContextMenu when pressed.
Phil Wright
2008-09-26 09:33:50
Is there any way to set the button's image to the same image that setting the ButtonSpec.Type might? I already tried setting the ButtonStyle, and it just seems to remove the border from the button.
Alex Lyman
2008-09-26 09:47:09
No, you cannot get the image from ButtonSpec.Type. There might be another approach. Try creating a KryptonHeader with a ButtonSpec and then remove all the content of the KryptonHeader.Values. Then remove the drawing of the header background/border and you end up with only a buttonspec!
Phil Wright
2008-09-26 09:52:03
Ooo, that'll do. Thanks, Phil!
Alex Lyman
2008-09-26 09:56:26