![]() |
Does a Pseudo-Group-Box Control Exist |
Post Reply
|
| Author | |
Warren
Groupie
Joined: 23 February 2005 Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Topic: Does a Pseudo-Group-Box Control ExistPosted: 10 November 2005 at 9:44am |
|
Easy Question. Maybe an easy answer?
I'm looking for a control that draws a divider line, like Microsoft uses (the image is from the Word 2003->Tools->Options dialog). I call it a Pseudo-Group Box, because the colours/theme are the same as a group box, but it's just the top edge of the group box. Is this in the Xtreme Toolkit? I've looked around, but the Toolkit has so much functionality that I though I might have just overlooked it.I could make them out of separate controls (e.g. a divider line overlapped by some static text, that is coloured differently), but I didn't think that was very elegant. What I was hoping for is one static control, that I could stretch out to the whole width, and the control would put the text on one side, and just draw the line from a slight bit past the end of the text to the other side of the control. Thanks Warren |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 November 2005 at 2:47am |
|
Hi, In Xtreme Toolkit pro there is no such control but, you right it can be separate controls See Options page of Customise Dialog (you can find this line) CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,122,9,101,1 |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Warren
Groupie
Joined: 23 February 2005 Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 November 2005 at 7:54am |
|
Yes, that's the work-around I have used before (i.e. the horizontal
etched line), but that doesn't give the text the "Themed" Blue text,
and the horizontal etched line is a bit darker than the
pseudo-group-box control used by Microsoft.
If I think of a good solution, I'll try to post something... Warren |
|
![]() |
|
Warren
Groupie
Joined: 23 February 2005 Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 November 2005 at 12:50pm |
|
This is resolved. I ended up writing this control myself (I wrote the whole thing myself - it's not based on any Codejock code) I posted the results as an article on CodeProject, if anyone else is interested in adding something like this to their project, the article is here:
http://www.codeproject.com/useritems/GroupLine.asp Codejock: If you want to add my control / any parts of it to the Xtreme Tookit, you're welcome to it... Warren |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 December 2005 at 9:27am |
|
Hi, Hint for you article: I saw in you code color of group box hardcoded. to get color you can use: COLORREF clrLine; GetThemeColor(theme, BP_GROUPBOX, GBS_NORMAL, TMT_BORDERCOLORHINT, &clrLine)
ps... We implemented our version of CGroupLine :) for CommandBars Customize Dialog. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Warren
Groupie
Joined: 23 February 2005 Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 December 2005 at 10:43am |
|
Thanks Oleg !
![]() I hated hardcoding that colour (as you could probably tell by the comment in my code), but I couldn't find the proper colour in the enourmous list of possible values for the theme API, and I didn't want to spend all day tracking it down. I found the documentation for the Theme API is unusually bad by Microsoft's standards - maybe they had a summer student write it up ![]() I will update my code and article. Thanks again... Warren |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |