Print Page | Close Window

Current Selection fo CommandBarComboBox

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


Topic: Current Selection fo CommandBarComboBox
Posted By: mxcolin
Subject: Current Selection fo CommandBarComboBox
Date Posted: 28 June 2006 at 10:10am
How do I get/set the current text selection for a CommandBarComboBox and for that matter a CommandBarEdit object? There doesn't seem to be a property that lets me get this. Any ideas?
 
Colin



Replies:
Posted By: SuperMario
Date Posted: 28 June 2006 at 10:44am
        Dim ControlComboSize As CommandBarComboBox
        Set ControlComboSize = .Add(xtpControlComboBox, ID_COMBO_SIZE, "Size")
        ControlComboSize.Width = 60
        ControlComboSize.AddItem "8"
        ControlComboSize.AddItem "9"
        ControlComboSize.AddItem "10"
        ControlComboSize.AddItem "11"
        ControlComboSize.AddItem "12"
        ControlComboSize.DropDownListStyle = True

        'Set to Item 3
        ControlComboSize.ListIndex = 3
       
        'Print out text
        Debug.Print ControlComboSize.Text


Posted By: mxcolin
Date Posted: 28 June 2006 at 10:52am
Sorry, I didn't explain that very well. I'm looking for the actual selected or highlighted text. So if I have highlighted "peter" in the word "peterson" how I programatically go about getting that "peter" is selected. I suppose the equivalent in a VB TextBox are the SelLength, SelStart, SelText Properties.
 
Thanks
 
Colin


Posted By: mxcolin
Date Posted: 30 June 2006 at 5:51am
ANy ideas if this is possible or will I have to use the API possibly to get this?



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