Αφαιρέθηκαν λάθη που έγινα μετά την 198 αναθεώρηση, στο σύστημα παραθύρων. Προστέθηκε η GetFocus (όχι SetFocus αλλά είναι το ίδιο πράγμα). Προστέθηκε η δυνατότητα Menu με το dropdown list
Declare form1 Form
Declare combo1 combobox Form form1
Declare text1 textbox Form form1
With combo1,"label","File Menu", "listtext" As list$, "list" As list$() ', "text" As combo1$,
With combo1,"MenuStyle", True, "MenuWidth", 4000 , "ListSelected" As Selected(), "Mark", Color(255,100,0)
With combo1, "MenuEnabled" As mEnable()
Method combo1,"MenuItem","Menu1",True, True, False, True
Method combo1,"MenuItem",""
Method combo1,"MenuItem","Menu2", False
Method combo1,"MenuRadio","Radio1", True, False,"Alfa1"
Method combo1,"MenuRadio","Radio2", True, False,"Alfa2"
Method combo1,"MenuRadio","Radio3", True, True,"Alfa3"
Method combo1,"Move", 3000,1000,2000,600
Method text1, "Move", 1000,2900,6000,600
list$(2)="Disabled" \\ always a new name enabled it
mEnable(2)=False \\ so we can disable it
Print mEnable(2)
With text1, "left" As left, "text" As text1.text$
Print left
Method form1, "show"
Function form1.unload {
Keyboard "!"
Show
}
Function combo1.dblclick {
read ndx
Print list$, Selected(ndx), ndx, list$(ndx)
}
Function combo1.click {
text1.text$=list$
}
Function combo1.scroll {
text1.text$=list$(number-1)
}
Function combo1.move {
text1.text$=list$(number-1)
}
a$=key$
Declare Text1 nothing
Declare combo1 nothing
Declare form1 nothing
Παρακάτω είναι ένα παράδειγμα με πίνακα (αν και έχω μόνο ένα στοιχείο..αλλά δουλεύει. Δεν δούλευε στις προηγούμενες αναθεωρήσεις). Επίσης έχω φτιάξει και εδώ να μένει "επιλεγμένο" το Combo, δηλαδή να μην αλλάζουν τα χρώματα όταν χάνει την εστίαση!
Declare form1 Form
Declare combo1 combobox Form form1
Declare text1 textbox Form form1
With form1,"Title" As title$
With combo1,"Edit", True,"UseOnlyTheList", false,"autocomplete", True, "listIndex" As ListIndex,"ShowAlways", True
With combo1,"label","Combo1", "ListText" As item$, "list" As list$(), "text" As combo1$
item$={alfa
delta
gamma
beta
}
With combo1,"Find" As Find()
Method combo1,"Sort"
combo1$=list$(find("gam*"))
Method combo1,"Move", 1000,1000,6000,600
Method text1, "Move", 1000,2900,6000,600
With text1, "left" As left, "text" As text1.text$ , "ShowAlways", True
Print left
Method form1, "show"
Method text1,"GetFocus"
Function form1.unload {
Keyboard "!"
show
}
Function combo1.dblclick {
text1.text$=combo1$
title$=combo1$
If find(title$)= -1 Then {
Method combo1,"additem",title$
Method combo1,"Sort"
listindex=find(title$)
}
}
Function combo1.click {
If listindex>=0 Then text1.text$=list$(listindex)
}
Function combo1.scroll {
If listindex>=0 Then text1.text$=list$(listindex)
}
a$=key$
Declare Text1 nothing
Declare combo1 nothing
Declare form1 nothing
Declare form1 Form
Declare combo1 combobox Form form1
Declare text1 textbox Form form1
With combo1,"label","File Menu", "listtext" As list$, "list" As list$() ', "text" As combo1$,
With combo1,"MenuStyle", True, "MenuWidth", 4000 , "ListSelected" As Selected(), "Mark", Color(255,100,0)
With combo1, "MenuEnabled" As mEnable()
Method combo1,"MenuItem","Menu1",True, True, False, True
Method combo1,"MenuItem",""
Method combo1,"MenuItem","Menu2", False
Method combo1,"MenuRadio","Radio1", True, False,"Alfa1"
Method combo1,"MenuRadio","Radio2", True, False,"Alfa2"
Method combo1,"MenuRadio","Radio3", True, True,"Alfa3"
Method combo1,"Move", 3000,1000,2000,600
Method text1, "Move", 1000,2900,6000,600
list$(2)="Disabled" \\ always a new name enabled it
mEnable(2)=False \\ so we can disable it
Print mEnable(2)
With text1, "left" As left, "text" As text1.text$
Print left
Method form1, "show"
Function form1.unload {
Keyboard "!"
Show
}
Function combo1.dblclick {
read ndx
Print list$, Selected(ndx), ndx, list$(ndx)
}
Function combo1.click {
text1.text$=list$
}
Function combo1.scroll {
text1.text$=list$(number-1)
}
Function combo1.move {
text1.text$=list$(number-1)
}
a$=key$
Declare Text1 nothing
Declare combo1 nothing
Declare form1 nothing
Παρακάτω είναι ένα παράδειγμα με πίνακα (αν και έχω μόνο ένα στοιχείο..αλλά δουλεύει. Δεν δούλευε στις προηγούμενες αναθεωρήσεις). Επίσης έχω φτιάξει και εδώ να μένει "επιλεγμένο" το Combo, δηλαδή να μην αλλάζουν τα χρώματα όταν χάνει την εστίαση!
Declare form1 Form
Declare combo1 combobox Form form1
Declare text1 textbox Form form1
With form1,"Title" As title$
With combo1,"Edit", True,"UseOnlyTheList", false,"autocomplete", True, "listIndex" As ListIndex,"ShowAlways", True
With combo1,"label","Combo1", "ListText" As item$, "list" As list$(), "text" As combo1$
item$={alfa
delta
gamma
beta
}
With combo1,"Find" As Find()
Method combo1,"Sort"
combo1$=list$(find("gam*"))
Method combo1,"Move", 1000,1000,6000,600
Method text1, "Move", 1000,2900,6000,600
With text1, "left" As left, "text" As text1.text$ , "ShowAlways", True
Print left
Method form1, "show"
Method text1,"GetFocus"
Function form1.unload {
Keyboard "!"
show
}
Function combo1.dblclick {
text1.text$=combo1$
title$=combo1$
If find(title$)= -1 Then {
Method combo1,"additem",title$
Method combo1,"Sort"
listindex=find(title$)
}
}
Function combo1.click {
If listindex>=0 Then text1.text$=list$(listindex)
}
Function combo1.scroll {
If listindex>=0 Then text1.text$=list$(listindex)
}
a$=key$
Declare Text1 nothing
Declare combo1 nothing
Declare form1 nothing
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου
You can feel free to write any suggestion, or idea on the subject.