Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Creating a ComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Creating a ComboBox

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


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Creating a ComboBox
    Posted: 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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2007 at 3:54pm
ComboBox is shown when you click an item and start editing.


Set column = ReportCntrl.Columns.Add(11, "xxx", 2, True) 

column.EditOptions.Constraints.Add "Yes", 0
column.EditOptions.Constraints.Add "No", 1
column.EditOptions.Constraints.Add "Unknown", 2

column.EditOptions.AllowEdit = False
column.EditOptions.ConstraintEdit = True

column.EditOptions.AddComboButton


--
WBR,
Serge
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2007 at 6:00pm
Ensure that editing is enabled at all on your control:

.AllowEdit = True
 
--
WBR,
Serge
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2007 at 8:39pm
Thanks, that was the ticket.
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.203 seconds.