Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Current Selection fo CommandBarComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Current Selection fo CommandBarComboBox

 Post Reply Post Reply
Author
Message
mxcolin View Drop Down
Newbie
Newbie
Avatar

Joined: 08 June 2006
Location: United Kingdom
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mxcolin Quote  Post ReplyReply Direct Link To This Post Topic: Current Selection fo CommandBarComboBox
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mxcolin View Drop Down
Newbie
Newbie
Avatar

Joined: 08 June 2006
Location: United Kingdom
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mxcolin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mxcolin View Drop Down
Newbie
Newbie
Avatar

Joined: 08 June 2006
Location: United Kingdom
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mxcolin Quote  Post ReplyReply Direct Link To This Post 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?
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.047 seconds.