![]() |
SOLVED CXTPControlFontComboBox - how to set text? |
Post Reply
|
| Author | |
ijwelch
Senior Member
Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Mr.Den
Groupie
Joined: 26 August 2007 Status: Offline Points: 50 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
ijwelch
Senior Member
Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Mr.Den
Groupie
Joined: 26 August 2007 Status: Offline Points: 50 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
ijwelch
Senior Member
Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 October 2009 at 7:01am |
|
bump.
|
|
|
ExtremeSuitePro 12.1.1
WinXP SP3 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
ijwelch
Senior Member
Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 November 2009 at 9:22am |
|
You're correct. I had label with same ID.
Thanks |
|
|
ExtremeSuitePro 12.1.1
WinXP SP3 |
|
![]() |
|
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 |