| |
|
|
- Page 1 - |
|
| Hi,
The function GetItemText does not work for me, if I the LV not the Mainwindow (%hWnd) create. CompileMarkSeparation -> CompileMarkSeparation ->
I have the same Completed: v1.6 and v1.7.
Why can the lying? - make I what wrong?
thanks for Your Mithilfe Thomas |
|
|
| |
|
|
|
| |
|
- Page 1 - |
|
Michael Wodrich | [quote:cc5b333cb1=Gast] @Michael: How bschrieben is GB2& a GroupBox, prepares with Create(Groupbox,%hWnd,Text,0.0.100,100)[/quote:cc5b333cb1] The problem is Yes simply, that we your Sourcecode not see can. so is naturally a Help you don't say so. here have You z.B. simply a Tippfehler (spots instead of Kommata) made. How the in the real code looks - well Yes...
there become You then well time debuggen must. simply for each element, the involved is a Datenausgabe write. is the supplied lever really mismatched zero etc. On these manner must You yourself then on whom Error herantasten. Evtl. instead of the code-Einfügungen too whom right Debugger using - moreover is it Yes there...
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/14/05 ▲ |
|
|
|
|
Frank Abbing | so, Guest Thomas.
now could ichs testing. GetItemText() functions correct too with Dialogfenstern! You make means somewhere a others Error, probably whom Syntaxfehler, How it Michael already described having.
Poste Please nächstes time always a kompletten Minimalsource, the the trouble aufweist, that you report want. otherwise is a Fehlersuche simply not nachvollziehbar. |
|
|
| |
|
|
|
| OK, OK.
a Syntaxfehler can I definitiv exclude, because if I GB2& against %hWnd swaps, funktionierts! Also go Syntaxfehler gemeldet, but here have I one kurzes Listing prepared: CompileMarkSeparationdeclare GB1&,GB2&,GB3&,GB4&,LV1&,LV2&,lvdll&
declare ende&,btn&,txt1&,txt2&
declare LVmarked&,LineMarked&,IsMarked&
declare LV_Mem#,LVItemText$
dim LV_Mem#,256
CLS
ListView DLL & Funktionen bereitstellen
lvdll& = UseDLL("Listview.dll")
$I LV_FUNCTION.INC
InitMessages(%HWnd)
InitMessages(GB2&)
Bildschirmmaske aufbauen
GB1& = Create("Groupbox",%hWnd," Groupbox #1 - Handle des LV auf %hWnd ", 10, 10,300,180)
GB2& = Create("Groupbox",%hWnd," Groupbox #2 - Handle des LV auf GB2& " , 10,210,300,180)
GB3& = Create("Groupbox",%hWnd,"" ,310,140,160, 50)
GB4& = Create("Groupbox",%hWnd,"" ,310,340,160, 50)
txt1& = Create("TEXT" ,GB3& ,"..." , 10, 12,140, 30)
txt2& = Create("TEXT" ,GB4& ,"..." , 10, 12,140, 30)
btn& = Create("Button" ,%hWnd,"DATEN WERDEN EINGELESEN..." , 10,400,620, 30)
ende& = Create("Button" ,%hWnd,"Beenden" ,530, 10,100,380)
EnableWindow btn& ,0
EnableWindow ende&,0
LV erstellen
dieses LV wird auf dem Hauptfenster erstellt
LV1& = CreateListView(%hWnd,%HInstance,RGB(0,0,0),RGB(0,127,127),-1,$25)
InsertColumn LV1&," " ,40,0
InsertColumn LV1&,"LS- Nr." ,90,0
InsertColumn LV1&,"Art.-Nr.",90,0
und dieses auf der Groupbox, die auf dem Hauptfenster erstellt wurde
LV2& = CreateListView(GB2&,%HInstance,RGB(0,0,0),RGB(127,127,127),-1,$25)
InsertColumn LV2&," " ,40,0
InsertColumn LV2&,"LS- Nr." ,90,0
InsertColumn LV2&,"Art.-Nr.",90,0
Einlesen der DB
LS_NR und ART_NR sind alphanumerisch (C,10)
dbOPEN(#1,"LS")
dbUse(#1)
Einlesen
WhileNot %dbEOF
dbGo(&Loop -1)
SetItem LV1&,"",Trim$(dbGet$("LS_NR")),Trim$(dbGet$("ART_NR")),Str$(&LOOP +1)
SetItem LV2&,"",Trim$(dbGet$("LS_NR")),Trim$(dbGet$("ART_NR")),Str$(&LOOP +1)
WEnd
dbClose(#1)
Anzeigen der LVs
ShowListView(LV1&,20,30,252,150)
ShowListView(LV2&,10,20,252,150)
Beginn des Auslesens
SetText btn&,"Zum Auslesen markieren, dann hier klicken..."
EnableWindow ende&,1
EnableWindow btn& ,1
While 1
CLEAR LV_Mem#,LVmarked&,LineMarked&,IsMarked&,LVItemText$
WaitInput
If %GetFocus = ende&
Beenden
break
endif
If %GetFocus = btn&
Wurde in einem LV markiert?
GetChecked(Addr(LVmarked&),Addr(LineMarked&),Addr(IsMarked&))
If IsMarked&
GetItemText(LVmarked&,LV_Mem#,2,LineMarked&)
LVItemText$ = String$(LV_Mem#,0)
If LVmarked& = LV1&
SetText txt1&,LVItemText$
SetText txt2&,"..."
Else
SetText txt1&,"..."
SetText txt2&,LVItemText$
EndIf
SetCheckboxState(LVmarked&,LineMarked&,0)
EndIf
EndIf
WEnd
Handling abschalten
CloseMessages(GB2&)
CloseMessages(%HWnd)
Speicher aufräumen
Dispose clv1#
Dispose clv2#
Dispose clvall#
Dispose lvitem#
DLL entladen
FreeDLL lvdll&
the wars!
END
here can I of course in GB2 The Mark settle / delete, but ausgewertet becomes tappt im dunkeln not...
mfG Thomas
P.s. On wish mail I The DB as ZIP To. |
|
|
| |
|
|
|
| @Thomas: my wish would the The Leuz here in the Community the vorgesehene CompileMarkSeparation Tags.
salvo. |
|
|
| |
|
|
| |
|
- Page 2 - |
|
|
| Please machine your obiges Posting and set The Tags.
and how can I my Posting Edit? or should I it new enstellen ( with Tags)?
mfG Thomas |
|
|
| |
|
|
|
Michael Wodrich | [quote:208ea1fd54=Gast]and how can I my Posting Edit?[/quote:208ea1fd54] You find to the end each Postings - means over the gestrichelten line under - on the rechten Page the following:
edit, Quote
with edit can You each self erstellte Posting as an afterthought once more Edit.
with Quote can You one fremdes Posting Quote. the ought to naturally only using go, if you a integrally designed part Quote want.
with Quote counts: apiece kürzer, so rather - lösche everything unwichtige from the QUOTE-day out - but: quotes Please not verfälschen.
Best wishes Michael Wodrich
PS: with whom Graphics over the Editfeld can You with # the CODE-day (for Programmcodes) open and close and the Sprechblase moreover the QUOTE-day (means The quotes). |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/16/05 ▲ |
|
|
|
|
Michael Wodrich | To Your code:
is you not noticed, that You GB2& - yet empty (= 0) - with InitMessages using and first later the lever hineinpackst?
you see: sometimes helps it, something auführlichere shred To post...
[quote:a04aee18a3]there become You then well time debuggen must. simply for each element, the involved is a Datenausgabe write. is the supplied lever really mismatched zero etc. On these manner must You yourself then on whom Error herantasten.[/quote:a04aee18a3] ...and this Tipp of moreover supra shows you, that these Fehlerart well something more frequently vorkommt as one it itself wish.
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/16/05 ▲ |
|
|
|
|
| [quote:e6f458e01b=Michael Wodrich][quote:e6f458e01b=Gast]and how can I my Posting Edit?[/quote:e6f458e01b] You find to the end each Postings - means over the gestrichelten line under - on the rechten Page the following:
edit, Quote[/quote:e6f458e01b]functions the too for guests |
|
|
| |
|
|
|
| Yes, here Mainpage » DLLs » List view.dll Forum functions the too for guests as long as these yet for Community as the poster discernible are.
salvo.
Nachtrag: I Have it abgestellt there me Überprüfung anhand the IP To uncertain appear. |
|
|
| |
|
|
|
Frank Abbing | very. You can InitMessages() for a Window naturally first Call, if this already prepares watts... |
|
|
| |
|
|
|
| Thank you!
Nunja, the complete Program exists z.Zt. from 25 Unterprogrammen with ca. 18800 Lines - there can sone Kleinigkeit time overlooking...
Vielen Thanks - too for Your patience!
Thomas |
|
|
| |
|
|
|
| having we still gladly made.
Thomas registriere you still simply - then have You here too More possibilities - z.B. Dateiuploads on Posts hang - or Posts edit etc.
then see You too always ifs what New gives.
salvo. |
|
|
| |
|
|