Subject:
|
Re: I need help on Delphi so I can finnish my program
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 18 Sep 2002 20:55:15 GMT
|
Viewed:
|
824 times
|
| |
 | |
"Eduardo Vazquez Harte" <eduvazhar@terra.es> skrev i meddelandet
news:H2nHw2.GBC@lugnet.com...
> I need to know how can I pass a selected Listbox item to a lets say 4 edits.
> Example user clicks on a item an then delphi passes the 4 words in the
> current item to 4 edits a word in each edit.
const
CtrlAndSpace = [#0..#32];
var
s: string;
p, q: integer;
begin
s := ListBox1.Items[ListBox1.ItemIndex];
p := 1;
while (p < Length(s)) and (s[p] in CtrlAndSpace) do Inc(p); // Skip
q := p;
while (q < Length(s)) and not (s[p] in CtrlAndSpace) do Inc(q);
Edit1.Text := Copy(s, p, q-p);
p := q;
// Repeat for Edit2, Edit3, Edit4
end;
--
Anders Isaksson, Sweden
BlockCAD: http://user.tninet.se/~hbh828t/proglego.htm
Gallery: http://user.tninet.se/~hbh828t/gallery/index.htm
|
|
Message is in Reply To:
 | | Re: I need help on Delphi so I can finnish my program
|
| I need to know how can I pass a selected Listbox item to a lets say 4 edits. Example user clicks on a item an then delphi passes the 4 words in the current item to 4 edits a word in each edit. Can someone help me plase. I hope is not with (...) (23 years ago, 18-Sep-02, to lugnet.cad.dev)
|
10 Messages in This Thread:         
    
    
   
   
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|