dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: What Mean of len in this Code

  1. #1
    Join Date
    Oct 2006
    Posts
    5

    Cool 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

  2. #2
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819

    Arrow

    Quote Originally Posted by Abu Bashar
    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 ..

    Quote Originally Posted by Abu Bashar
    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 .

    Quote Originally Posted by Abu Bashar
    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 .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

Similar Threads

  1. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 07:41 PM
  2. .NET equals Efficiency
    By Kevin in forum .NET
    Replies: 150
    Last Post: 03-04-2002, 06:40 PM
  3. Replies: 3
    Last Post: 07-09-2001, 03:25 PM
  4. Another Language
    By Steven Bell in forum .NET
    Replies: 260
    Last Post: 06-01-2001, 04:32 PM
  5. error code in JSP(please chek the code)
    By satish in forum Java
    Replies: 1
    Last Post: 09-22-2000, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center