rclarke
(Starting to like KiXtart)
2002-07-09 06:39 PM
Unsorted KiXGUI ComboBox

I am trying to create an unsorted ComboBox using KiXGUI v1.1 Build 42 with KiXtart v4.10, however the items in the Combobox are always sorted alphabetically regardless of the autosort value. The code fragment is as follows:

$cboCAPrfx = $frmMain.addcombobox("cboCAPrfx",$fraConnect.Left + 72,$fraConnect.top + 16,160,66)
$cboCAPrfx.autosort = 0
$cboCAPrfx.additem("No Prefix")
$cboCAPrfx.additem("Current Domain")
$cboCAPrfx.additem("Current Workstation")
$cboCAPrfx.listindex = 0

... and the resulting ComboBox displays:

Current Domain
Current Workstation
No Prefix

... rather than the expected:

No Prefix
Current Domain
Current Workstation

Is this a bug or I am calling the autosort property incorrectly? As usual, any help is much appreciated.

Rod.


Chris S.
(MM club member)
2002-07-09 10:16 PM
Re: Unsorted KiXGUI ComboBox

I've tried and tried with a sample script to "disable" Autosort, but can't seem to get it.

rclarke
(Starting to like KiXtart)
2002-07-10 12:47 AM
Re: Unsorted KiXGUI ComboBox

Thanks for trying it out Chris. All I can think is that contrary to the manual, the autosort property only works with a listbox, although I haven't tested it out yet. Alex, please can you put us out of our misery [Wink]

Chris S.
(MM club member)
2002-07-10 03:20 PM
Re: Unsorted KiXGUI ComboBox

I tried it with listbox as well during my testing, but it still sorted. I'll e-mail Alex and point him to this thread.

Oh, here's the script I tested with...

code:
; ListboxUse.k2k
;
; A demonstration script for KiXGUI
;
; Kixtart v4.01
; KiXGUI 1.0
;
; Done by Alex.H

break on

$root=createobject("KiXGUI.Desktop")
If not $root
? "KiXGUI not registered"
Exit 1
EndIf

$frmSample=$root.createform("frmSample","Listbox sample",200,100,220,180)
$=$frmSample.addtextbox("txtBox","",10,10,80,30)

;$Listbox=$frmSample.addlistbox("lstbox",110,10,80,100)
$Listbox=$frmSample.addcombobox("lstbox",110,10,80,100)
$listbox.onchange="Lstbox_change"
$=$frmSample.addlabel("lblBox","Click on a line in the listbox",40,120,200,30)

$Listbox.additem("Current Domain")
$Listbox.additem("No Prefix")
$Listbox.additem("Current Workstation")
;$Listbox.additem("Sample 4")
;$Listbox.additem("Sample 5")
;$Listbox.additem("Sample 7")
;$Listbox.additem("Sample 8")
;$Listbox.additem("Sample 6")
$listbox.Autosort=0
$frmsample.visible=1

while $frmSample.visible=1
$=execute($frmsample.lastevent)
loop

quit()

function Lstbox_change
$frmsample.controls("txtBox").caption=$Listbox.item($Listbox.listindex)
endfunction



rclarke
(Starting to like KiXtart)
2002-07-11 09:38 AM
Re: Unsorted KiXGUI ComboBox

Many thanks for answering that question Chris. I am also having issues with the SetAsDefault property, and the ChangeSysMenu & ShowFileBrowserXXXX methods (when stating a starting directory), but I'll save those problems for another day [Wink]

Rod.


Alex.H
(Seasoned Scripter)
2002-07-11 08:00 PM
Re: Unsorted KiXGUI ComboBox

Guys,
List and Combo boxes have the autosort style by default.
Also, i forgot something as the autosort property is working as read only [Eek!] (sig!)


LonkeroAdministrator
(KiX Master Guru)
2002-07-11 08:05 PM
Re: Unsorted KiXGUI ComboBox

alex, can you or have you allready updated the documentation for kixGUI?
there were a example which didn't work with 4.10

cheers,


Alex.H
(Seasoned Scripter)
2002-07-12 01:30 AM
Re: Unsorted KiXGUI ComboBox

Ok guys, you catch me, i surrender

Kixtart, kixtart, what's new since 4.02 ... What the heck !!!

starting to remove dust from kixgui source directory ... launching vb ... tipitipitip ...


rclarke
(Starting to like KiXtart)
2002-07-12 01:11 PM
Re: Unsorted KiXGUI ComboBox

Thanks Alex, we appreciate your support. BTW as per my earlier reply, if I do find other issues with KiXGUI, is it better to air them on the KiXtart Bulletin Board or e-mail you directly?

Rod.


LonkeroAdministrator
(KiX Master Guru)
2002-07-12 01:17 PM
Re: Unsorted KiXGUI ComboBox

clarke,
I would like to say something to that too...

questions about kixGUI directed to board reduces alex'es workload as he does not have to answer everyone of them.
on the other hand, as he has been pretty much of the board lately, the answer time may increase.

I have taken this method with kixforms:
I post question to board. if no answers come up and shawn does is not active, I post the question via e-mail.

cheers,


rclarke
(Starting to like KiXtart)
2002-07-12 01:56 PM
Re: Unsorted KiXGUI ComboBox

Sounds fine to me, btw my first name is 'Rod' not 'Clarke' [Smile]

LonkeroAdministrator
(KiX Master Guru)
2002-07-12 02:03 PM
Re: Unsorted KiXGUI ComboBox

I know.
it just is that loved child has many names and your displayname is rclarke.

quess, the real name is then rod clarke? or just clark?
are you the buddy who flyes in the skyes and is known also as superman?

cheers,


rclarke
(Starting to like KiXtart)
2002-07-12 02:18 PM
Re: Unsorted KiXGUI ComboBox

My full name is Rodney Clarke, but most people call me Rod rather than Rodney. Superman, I am definitely not, but I have been known to wear my underpants on the outside [Big Grin]

Chris S.
(MM club member)
2002-07-12 02:23 PM
Re: Unsorted KiXGUI ComboBox

Waaaaayyyyy too much information. [Eek!]