Print Page | Close Window

SOLVED CXTPControlFontComboBox - how to set text?

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


Topic: SOLVED CXTPControlFontComboBox - how to set text?
Posted By: ijwelch
Subject: SOLVED CXTPControlFontComboBox - how to set text?
Date 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



Replies:
Posted By: Mr.Den
Date 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


Posted By: ijwelch
Date 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


Posted By: Mr.Den
Date 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


Posted By: ijwelch
Date Posted: 22 October 2009 at 7:01am
bump.

-------------
ExtremeSuitePro 12.1.1
WinXP SP3


Posted By: Oleg
Date 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


Posted By: ijwelch
Date Posted: 09 November 2009 at 9:22am
You're correct. I had label with same ID.

Thanks

-------------
ExtremeSuitePro 12.1.1
WinXP SP3



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