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

.text not displaying in dropdown ???

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
MrOctober
KiXforms Dabbler
KiXforms Dabbler


Joined: 29 Apr 2006
Posts: 6

PostPosted: Wed Oct 08, 2008 7:05 pm    Post subject: .text not displaying in dropdown ??? Reply with quote

I must be missing something obvious. I've used the same code in other forms and it seems to work fine. In the code snippet below, I CAN NOT get my .text fields for each dropdown to display in the dropdown field. (I.e. like a default).

The form offers 3 dropdowns . . they should be defaulted to:
FITA 600 Round
2 AB
2

Not sure what I am missing but it currently isn't working. The form works fine if you select the items from the drop down.

Suggestions appreciated. This is old code and I'm sure I've been staring at it too long.

$MenuForm = $System.Form()
$MenuForm.Size = 800,300
$MenuForm.Text = "Select Format"
$MenuForm.FontName = "Courier New"
$MenuForm.FontSize = 16

$MenuLabel = $MenuForm.Controls.Label()
$MenuLabel.Size = 400,40
$MenuLabel.Left = 265
$MenuLabel.Top = 2
$MenuLabel.TextAlign = Center
$MenuLabel.FontName = "Tahoma"
$MenuLabel.Text = "Choose the shoot format"

$RdLabel = $MenuForm.Controls.Label()
$RdLabel.Size = 225,40
$RdLabel.Left = 20
$RdLabel.Top = 45
$RdLabel.TextAlign = 'Right'
$RdLabel.Text = "Select The Round:"

$Round = $MenuForm.Controls.ComboBox()
$Round.Text = "FITA 600 Round"
$Round.TextAlign = 'Left'
$Round.DropDownStyle = 2
$Round.DropDownWidth = 250
$Round.Height = 21
$Round.Fontname = "Courier New"
$Round.Left = 400
$Round.Sorted = "False"
$Round.Top = 45
$Round.Width = 250
$Round.AddItem("FITA 600 Round")
$Round.AddItem("PSAA 600 Round")
$Round.AddItem("NFAA 300 Round")
$Round.AddItem("Demo Mode")
$Round.AddItem("Restart in the Middle")

$LnLabel = $MenuForm.Controls.Label()
$LnLabel.Size = 225,40
$LnLabel.Left = 20
$LnLabel.Top = 90
$LnLabel.TextAlign = 'Right'
$LnLabel.Text = "Number of Lines:"

$Lines = $MenuForm.Controls.ComboBox()
$Lines.text = "2 AB"
$Lines.DropDownStyle = 2
$Lines.DropDownWidth = 20
$Lines.Height = 21
$Lines.Fontname = "Courier New"
$Lines.Left = 400
$Lines.Sorted = "False"
$Lines.Top = 90
$Lines.Width = 225
$Lines.AddItem("1 A")
$Lines.AddItem("2 AB")
$Lines.AddItem("3 ABC")
$Lines.AddItem("4 ABCD")

$PLabel = $MenuForm.Controls.Label()
$PLabel.Size = 320,40
;$PLabel.Border = 1
$PLabel.Left = 20
$PLabel.Top = 135
$PLabel.TextAlign = 'Right'
$PLabel.Text = "Number of Practice Ends:"

$Practice = $MenuForm.Controls.ComboBox()
$Practice.text = "2"
$Practice.DropDownStyle = 2
$Practice.DropDownWidth = 70
$Practice.Height = 21
$Practice.Fontname = "Courier New"
$Practice.Left = 400
$Practice.Sorted = "True"
$Practice.Top = 135
$Practice.Width = 275
$Practice.AddItem("0")
$Practice.AddItem("1")
$Practice.AddItem("2")
$Practice.AddItem("3")
$Practice.AddItem("4")

$MnButton = $MenuForm.Controls.Button()
$MnButton.Size = 120,31
$MnButton.Center
$MnButton.Top = 200
$MnButton.Text = "Continue"
$MnButton.OnClick = "CloseForm($$MenuForm)"

$MenuForm.Center
$MenuForm.Show
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Oct 08, 2008 8:55 pm    Post subject: Reply with quote

hmm...
couldn't find quickly the numbering scheme of the dropdownstyle enumeration.

comment out the lines with: DropDownStyle = 2

and try. any change?

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Oct 08, 2008 8:58 pm    Post subject: Reply with quote

me silly.
it was in the online help:
http://www.kixforms.org/docs/chm/index.htm?page=source%2Fcomboboxstyleenum.htm

and as I quessed, your dropdownstyle is set to non-editable textbox part.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
MrOctober
KiXforms Dabbler
KiXforms Dabbler


Joined: 29 Apr 2006
Posts: 6

PostPosted: Thu Oct 09, 2008 11:02 am    Post subject: Reply with quote

Thanks Lonkero . . . I missed that altogether. The other forms I am using I left dropdown style out so it was using "simple" and therefore working. Boy . . you don't know how long I sat and looked at that. It doesn't help that I worl on this code about once a year! LOL!
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Thu Oct 09, 2008 8:06 pm    Post subject: Reply with quote

I saw it too just because I am currently working with some vb .net code that also required me to study these combo thingies.

sadly it seems that .net combo is broken on some parts (append/suggest doesn't seem to work at all with 3.5), but I'm glad I was able to help.

_________________
Hammer
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic 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