KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Collection problems

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Jun 26, 2007 3:22 pm    Post subject: Collection problems Reply with quote

I am feeling really stupid right now...


I have the following code in my script. The problem being that I don't seem to be able (addled mind I think) to get the "Text / Value" of the selected item.

I have tried
$var.item($var.selectedindex)
$var.selectedvalue
$var.selectedtext

$var.selectedindex does return the expected results (the proper index #) but when I use any of the other methods I get a " " return.

Code:

$ComboBox1 = $System.ComboBox()
$ComboBox1.DropDownWidth = 88
$ComboBox1.Left = 7
$ComboBox1.Text = "MONTH"
$ComboBox1.Top = 77
$ComboBox1.Width = 88
$nul = $Form1.Controls.Add($ComboBox1)

$ComboBox1Item0 = $ComboBox1.Items.Add("JAN     01")
$ComboBox1Item1 = $ComboBox1.Items.Add("FEB     02")
$ComboBox1Item2 = $ComboBox1.Items.Add("MAR     03")
$ComboBox1Item3 = $ComboBox1.Items.Add("APR     04")
$ComboBox1Item4 = $ComboBox1.Items.Add("MAY     05")
$ComboBox1Item5 = $ComboBox1.Items.Add("JUN     06")
$ComboBox1Item6 = $ComboBox1.Items.Add("JUL     07")
$ComboBox1Item7 = $ComboBox1.Items.Add("AUG     08")
$ComboBox1Item8 = $ComboBox1.Items.Add("SEP     09")
$ComboBox1Item9 = $ComboBox1.Items.Add("OCT     10")
$ComboBox1Item10 = $ComboBox1.Items.Add("NOV     11")
$ComboBox1Item11 = $ComboBox1.Items.Add("DEC     12")

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Tue Jun 26, 2007 4:29 pm    Post subject: Reply with quote

isn't it just .Text?

$var.Text
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Jun 26, 2007 4:48 pm    Post subject: Reply with quote

Uh Duh Embarassed

Thanks for showing me the ways of my errors.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Tue Jun 26, 2007 5:11 pm    Post subject: Reply with quote

No worries. I do this all the time. Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group