Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - DropDown Bordr disappears w/ custom color
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DropDown Bordr disappears w/ custom color

 Post Reply Post Reply
Author
Message
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Topic: DropDown Bordr disappears w/ custom color
    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
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2005 at 1:53am
LunaColors  is global parameter. Or all CommandBars have it or none.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2005 at 1:59am
But we will fix it in next version.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2005 at 3:40pm
Great. Have you got a rough idea of when this might be available?
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 20 January 2005 at 3:49pm

Originally posted by dajv 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

Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2005 at 3:57pm
Originally posted by oleg oleg wrote:

LunaColors is global parameter. Or all CommandBars have it or none.

Originally posted by oleg oleg wrote:

But we will fix it in next version.

Is this fixed in 9.60?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2005 at 12:01am
yes.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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")


Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.