| |
|
|
 | now try I already since Meet a txt-File einzulesen, but my know streikt. The File contains several Lines and Split The How follows aufgebaut are: row1: "text";"erklärung";Artikel";"Bemerkung"; etc...... row2:"Wohnugssuche";"Mein Name";"Zeitung";"Rundschau of 23.08.2011"; etc ... one sees means different sizes into Textzeilen (without Zeilex:" before it) I need a Listbox where me The suitable row displayed becomes, I these Mark can and then spend can in a Window. but it should not The whole row outputted go, separate The values in String$. means A1$ should z.b. "Text" his, A2$="Erklärung" etc. The spending then in print "Text :" A1$ print "text :" a2$ etc.. have me virtual it would simply (with the example Csv what here Topic was) but far gefehlt. who can me here help. here yet my attempt
already time thanks beforehand for eure ideas. Frank
'-Begin-----------------------------------------------------------------
Declare Text$, electoral$, tex$, lin1$, lin2$, lines$[96000],c&
declare number$,name$
'-an large Box to display one Textes-----------------------------
ClearList
Assign #1,"h:\Test\example.csv"
Reset #1
input #1,lin1$
input #1,lin2$
WhileNot @Eof(#1)
Input #1,name$
lines$[c&]=name$
inc c&
AddStrings name$
EndWhile
Close #1
tex$ = @$ ListBox("csv",1)
cls
print substr$(lines$[tex$],2,"\\")
waitinput
'-End-------------------------------------------------------------------
End
|
|
|
| |
|
|
|
 Nico Madysa | ListBox$ gives as Result not The number the Line, separate The selected row as String. it ought to means sooner hot:
there Tex$ one String is, is it no number, into eckigen clinging having but only numbers something lost. |
|
|
| |
|
|
|
 Jörg Sellmeyer | you should no Lisbox, separate a GridBOX (too List view called) use. so can You whom Text each in a row standing and nevertheless Zellenweise hereon grab.
Perhaps helps you this example already time moreover:
Declare File$,row$
Declare lb&
Datei$ = $WinPath + "\\win.ini"
Cls
lb& = Create("GridBox",%hwnd,"Eintrag 1;0;198;Eintrag 2;2;198",0,10,10,400,400)
Set("ListDel","=")
Assign #1,File$
Reset #1
WhileNot EoF(#1)
Input #1,row$
AddStrings(lb&,row$)
Wend
Close #1
Set("ListDel","|")
While 1
WaitInput
If Clicked(lb&)
If GetCurSel(lb&) > -1
row$ = GetString$(lb&,GetCurSel(lb&))
MessageBox(SubStr$(row$,1,"|"),SubStr$(row$,2,"|"),0)
EndIf
EndIf
Wend
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 09/24/11 ▲ |
|
|
|
|
 | thanks Nico, but cht weitergekommen be I do not. thanks Jörg, your code has helped, but with my Listbox is it very the I Search and need. here the actually code, if it ever someone need. as File standing of course here csv can but too txt his
Declare Program$
Programm$ = $ GetDir("@")'-- Arbeitspfad in the interpreter mode
Declare File$
datei$ = Program$+"\\example.csv"
Declare Text$, electoral$, tex$, lin1$, lin2$, lines$[96000],c&
Declare number$,name$
ClearList
Assign #1,File$
Reset #1
input #1,lin1$
input #1,lin2$
WhileNot @Eof(#1)
Input #1,name$
lines$[c&]=name$
inc c&
AddStrings name$
EndWhile
Close #1
tex$ = @$ ListBox("csv",1)
cls
print (SubStr$(tex$,1,";"),0)
print (SubStr$(tex$,2,";"),0)
' and moreover data
waitinput
'-End-------------------------------------------------------------------
End
|
|
|
| |
|
|
|
 | Topic Please close.............
so trouble umgesetzt, it works everything so How I it need. Nochmal thanks for Help.
Frank |
|
|
| |
|
|
|
 Jörg Sellmeyer | If you you anmeldest, can You something like (and More) yourself manage. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 09/26/11 ▲ |
|
|
|