Hello guys,

First post and it's not even about Kix, but SteelKix.
For some reason I'm unable to use a Select-Case-EndSelect statement.
When I'm trying to use this, I get the following error message.

ERROR!
Message: Argument types do not match


The code section where I'm calling the eventhandler for a Combobox TextChanged event.
 Code:
Global $ComboBoxScheduleTask = $forms.ComboBox()
$FormScheduleJob.Controls.Add($ComboBoxScheduleTask)
$ComboBoxScheduleTask.Size = $drawing.Size(100,21)
$ComboBoxScheduleTask.Text = "Daily"
$ComboBoxScheduleTask.Location = $drawing.Point(12,35)
$ComboBoxScheduleTask.TabIndex = 2
$ComboBoxScheduleTask.MaxDropDownItems = 3
$ComboBoxScheduleTask.TextChanged += $system.eventhandler(AddressOf 
cmb_ST_TextChanged)


EventHandler cmb_ST_TextChanged:
 Code:
Function cmb_ST_TextChanged($sender,$e)
Select
   Case $sender.Text = "Daily"
	$GroupBoxDaily.Visible = 1
	$GroupBoxWeekly.Visible = 0
	$GroupBoxMonthly.Visible = 0
   Case $sender.Text = "Weekly"
	$GroupBoxDaily.Visible = 0
	$GroupBoxWeekly.Visible = 1
	$GroupBoxMonthly.Visible = 0
   Case $sender.Text = "Monthly"
	$GroupBoxDaily.Visible = 0
	$GroupBoxWeekly.Visible = 0
	$GroupBoxMonthly.Visible = 1
EndSelect
EndFunction


When I change the Select-Case-EndSelect with a simple If-EndIf, there is no problem.

EventHandler with If-EndIf:

 Code:
Function cmb_ST_TextChangedOK($sender,$e)
If $sender.Text = "Daily"
   $GroupBoxDaily.Visible = 1
   $GroupBoxWeekly.Visible = 0
   $GroupBoxMonthly.Visible = 0
EndIf

If $sender.Text = "Weekly"
   $GroupBoxDaily.Visible = 0
   $GroupBoxWeekly.Visible = 1
   $GroupBoxMonthly.Visible = 0
EndIf

If $sender.Text = "Monthly"
   $GroupBoxDaily.Visible = 0
   $GroupBoxWeekly.Visible = 0
   $GroupBoxMonthly.Visible = 1
EndIf
EndFunction


Can anyone tell me what I'm doing wrong?

Thanks,

BoForce