Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - SOLVED CXTPControlFontComboBox - how to set text?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED CXTPControlFontComboBox - how to set text?

 Post Reply Post Reply
Author
Message
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED CXTPControlFontComboBox - how to set text?
    Posted: 14 October 2009 at 6:50am
In Update event,
Control.Text = txt1.Font.Name
gives 'Object doesn't support this property' error.

Yet in Execute event,
txt1.Font.Name = Control.Text
works fine.

Please can anybody tell me wtf i'm supposed to do to update the control.
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2009 at 11:18am
If the control is an edit control it works, here is a snippet from some code I use:
 
Dim obBar As CommandBar
Dim obCtrl As CommandBarControl
 
    CommandBarsGlobalSettings.App = App
    
    CommandBars.Icons = ImageManager.Icons
   
    Set obBar = CommandBars.Add(App.Title, xtpBarTop)
   
    Set obCtrl = obBar.Controls.Add(xtpControlEdit, ID_PRINT_COUNT, "")
   
    obCtrl.DescriptionText = "Number of copies to print"
    obCtrl.IconId = ICON_NULL
    obCtrl.BeginGroup = False
    obCtrl.Style = xtpButtonAutomatic
    obCtrl.Enabled = False
    obCtrl.Width = 25
    obCtrl.Text = "1"
 
For the combobox, I think you have to .additem and then set the listindex property. (has been a while since I have used one)
Product: Xtreme SuitePro (ActiveX) version 16.3.1

Platform: Windows 7 Professional (64bit) - SP 1

Language: Visual Basic 6.0 SP 6
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2009 at 10:35am
Sorry Mr Den. This is about a custom control not normal CommandBarComboBox.
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
Mr.Den View Drop Down
Groupie
Groupie
Avatar

Joined: 26 August 2007
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mr.Den Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2009 at 11:32am
Aye that.
Product: Xtreme SuitePro (ActiveX) version 16.3.1

Platform: Windows 7 Professional (64bit) - SP 1

Language: Visual Basic 6.0 SP 6
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2009 at 7:01am
bump.
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2009 at 8:42am
Hi,
 
Are you sure you update ComboBox and not some control with same Id.
 
Try add
 
 If (Control.Type = xtpControlComboBox) Then Control.Text = ...
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2009 at 9:22am
You're correct. I had label with same ID.

Thanks
ExtremeSuitePro 12.1.1
WinXP SP3
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.063 seconds.