Print Page | Close Window

How do I hide Drop Down Triangle on Control Popup

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=5829
Printed Date: 06 November 2025 at 2:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I hide Drop Down Triangle on Control Popup
Posted By: LeeHayton
Subject: How do I hide Drop Down Triangle on Control Popup
Date Posted: 18 December 2006 at 12:21pm

When I use a controlpopup button to display a menu it shows the drop down triangle next to the icon.  How do I turn it off?

Thanks
Lee
 



Replies:
Posted By: Oleg
Date Posted: 19 December 2006 at 8:43am
Hi,
instead xptControlPopup use xtpControlButtonPopup...


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: LeeHayton
Date Posted: 19 December 2006 at 10:08am
Thanks for that Oleg - it works fine.
 
I am trying to mimic a calendar type popup control - by using a command bar and adding a calendar within a picture box to a xtpcontrolcustom.  (If I just use the handle of the Calendar control it dissapears when you click on it.)
 
    Dim cbcc As CommandBarControlCustom, cbb As CommandBarButton, cbp As CommandBarPopup
       
    Set cbcc = .ActiveMenuBar.Controls.Add(xtpControlCustom, ID_TEXT1, "")
        cbcc.Handle = Text1.hwnd
        cbcc.Flags = xtpFlagControlStretched
    
    Set cbp = .ActiveMenuBar.Controls.Add(xtpControlButtonPopup, ID_DatePickerDropDown, "")
        cbp.Style = xtpButtonIcon
        cbp.IconId = 1
        cbp.ToolTipText = "Select a date from the calendar."
        Set cbcc = cbp.CommandBar.Controls.Add(xtpControlCustom, ID_DatePicker, " ")
            cbcc.Handle = picDatePicker1.hwnd
            cbcc.Style = xtpButtonAutomatic
 
When I click the value on the calendar it puts it in the text box but then i need to close the expanded menu to hide the calendar.  I do this by executing the command button and then setting the focus to the text box.
 
    Text1 = DatePicker1.Selection.Blocks(0).DateBegin
    Dim cbp As CommandBarPopup
    Set cbp = cbToolbar.FindControl(, ID_DatePickerDropDown)
        cbp.Execute
    Text1.SetFocus
However, my problem is this - the calendar button still retains the highlight box (focus rectangle) around it until you hover the mouse back over the control.  How do I get rid of this and am I going about this the wrong way?
 
 
Thanks again
Lee
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net