Autor Beitrag
moloch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 17.09.04 12:51 
Hallo Forum,

ich erstelle mir wärend der Laufzeit eine ListView und initialisiere unter anderem mit den folgenden Werten.


ViewStyle := vsReport;
OnInfoTip := ListViewInfoTip;
ShowHint := True;


Mein Ziel ist es in das Ereignis OnInfoTip zu gelangen, da komme ich aber nicht hin. Weiss jemand woran das liegen könnte. In der Delphi-Hilfe steht ja, dass es ausgelöst wird wenn man mit dem Mauszeiger auf einem Listen-Eintrag steht.
Also andere Ereignisse zu verknüpfen wie zum beispiel ondraw schaffe ich ja auch. Was fehlt hier?

mfg
moloch
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 17.09.04 13:37 
Zitat:
Hallo Forum,
Forum grüßt moloch :wink:

Zitat:
da komme ich aber nicht hin
wie äußert sich das? Compilerfehler, Laufzeitfehler, Ereignis tritt nicht ein, ...?

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 17.09.04 14:00 
haltepunkt ist gesetzt und ich komme nicht an.
keine fehler.
mfg
moloch
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 17.09.04 14:12 
hast du ShowHint (des ListViews) auf true?
sonst zeig mal'n bisschen Code.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 17.09.04 14:24 
also showhint ist auf true, das habe ich aber oben schon angegeben.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
//so erzeuge ich
  ListView := TListView.Create(Self);
  ListView.Name := cListViewKennung;

  try
    with ListView do begin
      //Listview initialisieren
      Parent := Self;
      Align := alclient;
      ViewStyle := vsReport;
      OnCustomDrawItem := ListViewCustomDrawItem;
      OnCustomDrawSubItem := ListViewCustomDrawSubItem;
      OnInfoTip := ListViewInfoTip;
      ShowHint := True;
...

//und hier möchte ich gerne ankommen wenn ich den Mauszeiger positioniere
procedure ListViewInfoTip(Sender: TObject; Item: TListItem;
  var InfoTip: string);
begin
  ShowMessage('test');
end;




mfg
moloch

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 17.09.04 14:29 
bei mir hat's geklappt als ich die procedure ListViewInfoTip im public der Forum deklariert hab.
vorher wollts der COmpile rgar net schlucken.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
moloch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 451

Win 2000
D5 Prof
BeitragVerfasst: Fr 17.09.04 14:51 
hey,
ok ja bei mir klappt es auch, aber nur in der ersten spalte.
der grund dafür ist das nur die erste spalte der item ist, alle weiteren spalten sind subitems. tja und jetzt?
kommt jetzt jetzt nur der hint in der ersten spalte oder wie?
oder habe ich evtl das listview von grund her falsch aufgebaut?

mfg
moloch
Crowbar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 180

WinXP, SP2
D6 Enterprise
BeitragVerfasst: Sa 16.10.04 16:57 
Hi,
wie kann man diese Funktion auf eine ListBox - Komponente anwenden?
Die ListBox - Komponente hat ja kein "OnTipInfo" - Ereignis.
Gibt es da einen Trick? :?

Cu Crowbar
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: Sa 16.10.04 17:43 
moloch hat folgendes geschrieben:
hey,
ok ja bei mir klappt es auch, aber nur in der ersten spalte.
der grund dafür ist das nur die erste spalte der item ist, alle weiteren spalten sind subitems. tja und jetzt?
kommt jetzt jetzt nur der hint in der ersten spalte oder wie?
oder habe ich evtl das listview von grund her falsch aufgebaut?

mfg
moloch

Ja hmm,
bei mir ist's genau das Gleiche, bloss mit der letzten Spalte. also der Hint kommt nur in der letzten Spalte... allerdings ist mir das bei nem TntListView aufgefallen, das ist ein modifiziertes ListView mit Unicode-Unterstützung.

Das stört mich schon ein bisserl weil ich die Hints eigentlich in jeder Spalte haben wollte.. allerdings brauche ich das OnInfoTip Ereignis nicht.
Crowbar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 180

WinXP, SP2
D6 Enterprise
BeitragVerfasst: Mo 18.10.04 10:41 
Hi,
die Methode GetItemAt (TListView) gibt das Listenelement an der angegebenen Position zurück.
Hat man zur GetItemAt eine "alternative" Methode für die TListBox?

Cu Crowbar
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mo 18.10.04 12:27 
Ich würd mal sagen neue Frag eneur Thread oder?
denn das hat jetzt nun doch nichts mehr mit der gestellten frage zu tun.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Crowbar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 180

WinXP, SP2
D6 Enterprise
BeitragVerfasst: Mo 18.10.04 14:02 
Schon geschehen... :!:

Cu Crowbar