Print Page | Close Window

CommandBarComboBox insertstext before EditHint

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=7617
Printed Date: 18 June 2025 at 9:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBarComboBox insertstext before EditHint
Posted By: bobmazanec
Subject: CommandBarComboBox insertstext before EditHint
Date Posted: 17 July 2007 at 2:26pm
I have a CommandBarComboBox with these options:
.AutoComplete = True
.DropDownListStyle = True
.Style = xtpButtonCaption
.EditHint = "Some Hint"
When I click in the ComboBox, it selects the EditHint text.
If I insert or append characters -- instead of overwriting all of them -- it appears to keep the EditHint - e.g., .Text = "insertedSome Hint"
If I remove the inserted characters, the hint reverts to grey and .Text to ""
 
Is there an option or property to keep the .EditHint out of .Text unless the user really types it?
 
TIA,
bob
 



Replies:
Posted By: Oleg
Date Posted: 18 July 2007 at 1:55am
Hello,
 
Sorry, I can't reproduce it with current release. What Commandbars version do you have?


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


Posted By: bobmazanec
Date Posted: 18 July 2007 at 9:43am
10.4.1 (somehow I've missed 11.x until now)
 
After further experimentation, it only seems to happen when I call the CommandBars' RecalcLayout in the ControlNotify handler.
 
I have reproduced it in a simple project w/ a single Form containing a CommandBars control:
Private Sub Form_Load()
    With CommandBars1.Add("commandbar", xtpBarTop)
        ConfigureComboBox .Controls.Add(xtpControlComboBox, 1, "")
    End With
End Sub

Private Sub ConfigureComboBox(ByVal cb As CommandBarComboBox)
    With cb
        .DropDownListStyle = True
        .EditHint = "Some Hint"
        .Width = 200
    End With
End Sub
 
Private Sub CommandBars1_ControlNotify(ByVal Control As XtremeCommandBars.ICommandBarControl, ByVal Code As Long, ByVal NotifyData As Variant, Handled As Variant)
    CommandBars1.RecalcLayout
End Sub
 


Posted By: bobmazanec
Date Posted: 18 July 2007 at 10:31am
I can't reproduce it on 11.1.3 Eval - thanks!
 
bob



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