What Mean of len in this Code
;) What Mean of len in this Code:-
if left(data,len(textbox1)) = textbox1 then listbox1.additem data
The Full Code Project:-
In the change() event of textbox1 :-
open the dictinary source and get from it all names like the begeening of what was entred like this:
'data is a variable containing the readen word,
if left(data,len(textbox1)) = textbox1 then listbox1.additem data
=======================================================================================
In the doubleclick() event in listbox1 :-
open the dictinary source to get the meaning of the selected item , put it in a variable "mean" say
textbox2 = ListBox1.List(ListBox1.ListIndex)
listbox2.clear
listbox2.additem mean
[788 byte] By [
Abu Bashar] at [2007-11-11 9:59:21]

# 1 Re: What Mean of len in this Code
;) What Mean of len in this Code:-
if left(data,len(textbox1)) = textbox1 then listbox1.additem data
the if condition check if the left of "data" taking the first characters in the left with length equal of "textbox1" container length and compare it with textbox1 , if equality holds it add the data to the listbox1 :
Example:
if data = "ABCDefgh" and textbox1 = "ABCD" then
len (textbox1) = 4
left(data, 4) = "ABCD" and regarding to the equality ; "ABCDefgh" will be add to the listbox1 ..
The Full Code Project:-
In the change() event of textbox1 :-
open the dictinary source and get from it all names like the begeening of what was entred like this:
'data is a variable containing the readen word,
if left(data,len(textbox1)) = textbox1 then listbox1.additem data
=======================================================================================
Here it make some thing like autocomplete as it check if the data first letters are similar of the textbox entred ; if so it add this data into the listbox1 .
In the doubleclick() event in listbox1 :-
open the dictinary source to get the meaning of the selected item , put it in a variable "mean" say
textbox2 = ListBox1.List(ListBox1.ListIndex)
listbox2.clear
listbox2.additem mean
here it add the selected word from listbox1 in the textbox2;
clear the listbox2 and add in it the meaning of the selected word .. I guess u need to specify mean take it's value from where if u haven't made it yet .
Amahdy at 2007-11-11 17:23:26 >
