ComboBox with Markup |
Post Reply |
Author | |
ScottW
Groupie Joined: 02 August 2005 Status: Offline Points: 82 |
Post Options
Thanks(0)
Posted: 02 February 2009 at 5:37pm |
I have run into an issue with the ComboBox control that I hope there is a way to fix. When using markup with combodropdownlist style, selecting works great and shows the markup in the text box part. However, in combodropdown mode, you see the markup in the text box after you select an item. Yuck! I tried to use the click event to change the ComboBox text property to the text without the markup, but it only works the first time, after that it shows the markup even after I change the property.
If you make a VB6 Form with a single ComboBox control on it, you can paste in this form code to duplicate: Option Explicit Private Sub ComboBox1_Click() Debug.Print "Click", ComboBox1.Text, ComboBox1.Text = Mid$(ComboBox1.Text, 12, 6) Debug.Print , ComboBox1.Text End Sub Private Sub Form_Load() Debug.Print "--------------------" With ComboBox1 .EnableMarkup = True .AddItem "<TextBlock>Item 1</TextBlock>" .AddItem "<TextBlock>Item 2</TextBlock>" .AddItem "<TextBlock>Item 3</TextBlock>" .ListIndex = 1 End With End Sub |
|
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 |