DropDown Bordr disappears w/ custom color
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1679
Printed Date: 16 June 2024 at 3:30pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: DropDown Bordr disappears w/ custom color
Posted By: dajv
Subject: DropDown Bordr disappears w/ custom color
Date 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
|
Replies:
Posted By: dajv
Date Posted: 19 January 2005 at 3:44pm
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.
|
Posted By: dajv
Date Posted: 19 January 2005 at 7:18pm
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?
|
Posted By: Oleg
Date Posted: 20 January 2005 at 1:53am
LunaColors is global parameter. Or all CommandBars have it or none.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: Oleg
Date Posted: 20 January 2005 at 1:59am
But we will fix it in next version.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: dajv
Date Posted: 20 January 2005 at 3:40pm
Great. Have you got a rough idea of when this might be available?
|
Posted By: gshawn
Date Posted: 20 January 2005 at 3:49pm
dajv wrote:
Great. Have you got a rough idea of when this might be available? |
Hi, check out this topic for more info: https://forum.codejock.com/forum_posts.asp?TID=1549 - https://forum.codejock.com/forum_posts.asp?TID=1549
|
Posted By: dajv
Date Posted: 16 February 2005 at 3:57pm
oleg wrote:
LunaColors is global parameter. Or all CommandBars have it or none. |
oleg wrote:
But we will fix it in next version. |
Is this fixed in 9.60?
|
Posted By: Oleg
Date Posted: 17 February 2005 at 12:01am
yes.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: jerry2000
Date Posted: 03 March 2005 at 4:52am
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")
|
Posted By: dajv
Date Posted: 03 March 2005 at 6:28pm
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.
|
Posted By: jerry2000
Date Posted: 04 March 2005 at 12:34am
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?
|
|