DropDown Bordr disappears w/ custom color |
Post Reply |
Author | ||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
Posted: 19 January 2005 at 12:51am |
|
Gday,
I am trying to recreate the outlook "find" bar, pictured below: I have so far got mine to look like this: (note the combobox appears weird - the border has disappeared.) with the following code (not contiguous lines, these are snippets): ' set the colours so as to "remove" the gradient on the toolbar CommandBars.SetSpecialColor COLOR_WINDOW, Form1.CommandBars1.GetSpecialColor(XPCOLOR_SPLITTER_FACE) CommandBars.SetSpecialColor COLOR_BTNFACE, Form1.CommandBars1.GetSpecialColor(XPCOLOR_SPLITTER_FACE) CommandBars.SetSpecialColor XPCOLOR_TOOLBAR_FACE, Form1.CommandBars1.GetSpecialColor(XPCOLOR_SPLITTER_FACE) CommandBars.Options.LunaColors = False CommandBars.RecalcLayout Dim ToolBar As CommandBar ' add the buttons Set ToolBar = CommandBars.Add("Standard1", xtpBarTop) With ToolBar.Controls .Add xtpControlLabel, 9000, " Look for:" Set cbo = .Add(xtpControlComboBox, 9001, "") cbo.DropDownListStyle = True Set ctrl = .Add(xtpControlPopup, 9002, "Search In") ctrl.Style = xtpButtonCaption Set ctrl = .Add(xtpControlButton, 9003, "Find Now") ctrl.Style = xtpButtonCaption Set ctrl = .Add(xtpControlButton, 9004, "Clear") ctrl.Style = xtpButtonCaption ctrl.Enabled = False Set ctrl = .Add(xtpControlPopup, 9005, "Options") ctrl.Style = xtpButtonCaption ctrl.Flags = xtpFlagRightAlign Set ctrl = .Add(xtpControlButton, 9006, "Close") ctrl.Flags = xtpFlagRightAlign End With ' stuff to hide the fact it is a toolbar CommandBars.EnableCustomization True CommandBars(3).ModifyStyle XTPCommandBarStyle.XTP_CBRS_GRIPPER, 0 CommandBars(3).ContextMenuPresent = False CommandBars.Options.ShowExpandButtonAlways = False CommandBars.EnableCustomization False CommandBars(3).SetFlags xtpFlagStretched, 0 All this is in an attempt to hide the fact that it is a toolbar. My problem is with the combobox. How can i set the colour of the border so it doesnt disappear? perhaps there is a "special colour" i can set? Any advice is appreciated. Thanks |
||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
|
I should also say that I am using xtpThemeOffice2003 for the popup menus.
If I set the commandbar to use xtpThemeOfficeXP, I can leave the colours alone and it will appear like the outlook find bar, except then I lose the office 2003 look menus in the popup controls. To explain further, it seems setting SpecialColors COLOR_WINDOW and COLOR_BTNFACE to the same colour stops the border of the dropdown being shown. The border does show on mouseover, or when you click in the dropdown list. |
||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
|
I realised if I set the theme to xtpThemeOfficeXP I can set XPCOLOR_TOOLBAR_FACE to change the toolbar colour, then change COLOR_WINDOW to white to get back the dropdown. here is the end result:
This CommandBar is inside a picturebox which is inside an MDI child window. The applications main CommandBar (for menus/toolbars) is in the MDI Parent form. I have noticed that after I added the CommandBars in the child form, the CommandBars control in the Parent form randomly loses its LunaColors value and it stays hte same even after restarting the app. If I break and manually set LunaColors to be true in VB's immediate window, it will switch back and work after multiple application restarts. Very strange behaviour indeed... Anybody experienced this before? |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
LunaColors is global parameter. Or all CommandBars have it or none.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
But we will fix it in next version.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
|
Great. Have you got a rough idea of when this might be available?
|
||
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
|
Hi, check out this topic for more info: https://forum.codejock.com/forum_posts.asp?TID=1549 |
||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
|
Is this fixed in 9.60? |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
yes.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
jerry2000
Newbie Joined: 22 April 2004 Status: Offline Points: 29 |
Post Options
Thanks(0)
|
|
How has you solved the "tab function"? When the user press the
tabulator key to switch the focus to the next contol (e.g. from "search
in" to "find now")
|
||
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
|
This wasn't a problem...? I didn't do anything special, the tabbing works as expected.
Maybe i've misunderstood you, but I didnt have a problem with tabbing. |
||
jerry2000
Newbie Joined: 22 April 2004 Status: Offline Points: 29 |
Post Options
Thanks(0)
|
|
No, you don't have me misunderstood. I use a tab like yours in a
dialogbox. And this modal dialog is running in an extension dll (i cant
modify the calling application). I use 2 combobox in the toolbar and it
is not possible to change the focus from combo1 to combo2 with the tab
key. The focus switch alwas to an dialog element.
Have you any idea? |
||
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 |