Print Page | Close Window

Missing combobox.newIndex

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6980
Printed Date: 17 November 2024 at 2:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Missing combobox.newIndex
Posted By: cybeh
Subject: Missing combobox.newIndex
Date Posted: 25 April 2007 at 10:14pm
Hi,

I use to do this in my code


cboTest.AddItem "ABC"
cboTest.ItemData(cboTest.NewIndex) = "1"


but, seems like i can't find the NewIndex in the codejock combobox.

Thanks.




Replies:
Posted By: Oleg
Date Posted: 26 April 2007 at 12:36am
Please change it to
 
Dim Index as Long
Index = cboTest.AddItem ("ABC")
cboTest.ItemData(Index) = "1"


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: MNovaro
Date Posted: 26 April 2007 at 4:33am
I've got the same problem.
The solution suggested by Oleg is not working for me, since the AddItem is a Sub and not a Function: I get a "type mismatch" error when I try to use:

Instead, I solved this with the following code:

cmbFolder.AddItem "This"
cmbFolder.ItemData(cmbFolder.ListCount - 1) = -1

Anyhow, adding .NewIndex ot the CodeJock combo would be better, since it would let this to be compatible with the standard combo.
Thanks
Marco



Posted By: Oleg
Date Posted: 26 April 2007 at 6:40am
Thanks,
 
Indeed :(
 
NewIndex property added.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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