8

I want to draw a Chevron button

enter image description here

in a custom dialog form and I'm wondering if exist a State and Part constant to be used with the DrawThemeBackground function or I must draw this kind of button manually?

Salvador
  • 16,132
  • 33
  • 143
  • 245

2 Answers2

12

The closest I can find for XP is

ThemeServices.DrawElement(Canvas.Handle, GetElementDetails(tebNormalGroupExpandNormal), Rect(10, 100, 100, 200));

enter image description here

or

EBP_NORMALGROUPEXPAND using DrawThemeBackground directly. However this draws a double arrow (on XP at least)

However later windows versions also have TDLG_EXPANDOBUTTON, which is what you want judging by the image at Where do I find the icons / animations recommended in the Windows 7 UX guide?

Thanks to Andreas (as usual for theme and customer drawing related questions)

See also his utility at Windows Visual Themes: Gallery of Parts and States?

Ideally I would use the second version if available, but fall back to the first on XP.

Community
  • 1
  • 1
Gerry Coll
  • 5,867
  • 1
  • 27
  • 36
  • Here's a link to the UXguide: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=e49820cb-954d-45ae-9cb3-1b9e8ea7fe8c – Johan Sep 01 '11 at 08:20
0

You can't find it in the list of Parts and States? Then it doesn't exist. http://msdn.microsoft.com/en-us/library/bb773210(v=vs.85).aspx

GolezTrol
  • 114,394
  • 18
  • 182
  • 210