![]() |
Creating a ComboBox |
Post Reply
|
| Author | |
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Topic: Creating a ComboBoxPosted: 22 January 2007 at 2:58pm |
|
I'm trying to create a ComboBox in a ReportControl. For a specific column I want all of the rows to have a ComboBox. I tried the following at the time in which I create the columns for the RC:
Set column = ReportCntrl.Columns.Add(11, "xxx", 2, True)
column.EditOptions.AddComboButton column.EditOptions.Constraints.Add "Yes", 0 column.EditOptions.Constraints.Add "No", 1 column.EditOptions.Constraints.Add "Unknown", 2 The column does get created but no ComboBox appears once Records populate the RC. So then I tried adding Records and then adding the ComboBox to the proper ReportRecordItem like so:
Set Item = Record.AddItem("xxx")
Item.CreateEditOptions Item.EditOptions.AddComboButton Item.EditOptions.Constraints.Add "Yes", 0
Item.EditOptions.Constraints.Add "No", 1 Item.EditOptions.Constraints.Add "Unknown", 2 Still no ComboBox appears. Is there something I'm not doing here that causes the ComboBox to not appear?
JW
|
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 January 2007 at 3:54pm |
|
ComboBox is shown when you click an item and start editing.
-- WBR, Serge |
|
![]() |
|
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 January 2007 at 5:42pm |
|
Well, yes, I guess I should have mentioned that I did click on the item. The ComboBox still did not appear. Should I be creating the ComboBox when I create the columns as in my first code example or later, when I add Records? Given that it does not appear in either example after clicking on the Item what could I be doing wrong? Is there some attribute I need to set on the Column or ReportRecordItem for the ComboBox to appear after clicking upon it?
|
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 January 2007 at 6:00pm |
|
Ensure that editing is enabled at all on your control:
--
WBR,
Serge
|
|
![]() |
|
Shawshank
Senior Member
Joined: 16 October 2005 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 January 2007 at 8:39pm |
|
Thanks, that was the ticket.
|
|
![]() |
|
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 |