Autor |
Beitrag |
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: Mo 24.06.02 12:21
Hallo ich möchte in eine Listbox eine vertikale (von links nach recht ) Scrollbar reinhaben, die erscheint wen eine zeile über die breite der listbox rausgeht...
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
mathias
Beiträge: 58
Erhaltene Danke: 3
|
Verfasst: Mo 24.06.02 20:23
|
|
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: Mo 24.06.02 20:56
Wie bekomme ich die Breite des ListBoxinhalt heraus? ist das die breite der listbox?
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: Sa 29.06.02 00:38
hat keiner eine idee ich bastel grad an einem code, aber es funzt noch ncih so ganz.. ich werde dann meine lösung mal posten, wäre aber nett falls es einer schon weiß
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
TheUnknown
Beiträge: 334
|
Verfasst: Sa 29.06.02 07:25
Zuletzt bearbeitet von TheUnknown am Do 22.08.13 09:16, insgesamt 2-mal bearbeitet
|
|
mathias
Beiträge: 58
Erhaltene Danke: 3
|
Verfasst: Sa 29.06.02 20:59
Titel: Re: Hmmm, vielleicht so...!?
Man muss also jeden einzelen Eintrag durchtesten um zu schauen welcher am längsten ist.
|
|
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: So 30.06.02 00:44
Titel: funzt nich :(
also meine funktion sieht jetzt so aus aber es kommt immer der gleiche 6 stellige wert raus, egal ob ich einen buchstabe eingebe oder zwi oder drei...
was habe ich falsch?
Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27:
| function lbbreite :integer; var lbl : TLabel; var cache,i:integer; begin if form1.ListBox1.items.Count <> 0 then begin for i:=0 to form1.listbox1.items.Count-1 do begin lbl := TLabel.Create(Form1); lbl.Parent := Form1; lbl.Visible := False; lbl.AutoSize := True; lbl.Caption:=''; lbl.Width:=0; lbl.Caption := form1.ListBox1.Items[i]; if lbl.width > cache then cache := lbl.Width; lbl.Free; end; if cache < form1.listbox1.Width then cache:=0; result:=cache; end else result:=0;
showmessage(inttostr(result)); end; |
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
TheUnknown
Beiträge: 334
|
Verfasst: So 30.06.02 10:22
Zuletzt bearbeitet von TheUnknown am Do 22.08.13 09:16, insgesamt 2-mal bearbeitet
|
|
Chatfix
Beiträge: 1583
Erhaltene Danke: 10
Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
|
Verfasst: So 30.06.02 10:36
Ja danke jetzt funzt es.. ist aber trotzdem komisch das bei meiner variante ein 6stelliger wert rauskommt.. mhhh naja egal...
_________________ Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
|
|
|