You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Peter

Trainee

  • "Peter" is male
  • "Peter" started this thread

Posts: 69

Date of registration: Nov 24th 2008

Location: Cologne, Germany

Occupation: Second Vice President of Distributed Junk and Trash Development

  • Send private message

1

Tuesday, November 25th 2008, 12:52pm

ListIndex-Property einer Listbox funktioniert anders?

Hallo Manuel,

folgender kleiner Schnippsel:

Jabaco Source

1
2
3
4
Public Sub Command1_Click()
   list1.AddItem "lala"
   list1.ListIndex = list1.ListCount - 1
End Sub

Hier wird also bei jeden Command-Click der Listbox ein Item hinzugefügt und dieses neue Item auch selektiert. In VB ist es nun allerdings so, dass ein selektierter Eintrag auch automatisch in den sichtbaren Bereich der Listbox gescrollt wird, wenn er unten ausserhalb des sichtbaren Bereiches hinzugefügt wird. In Jabaco ist dies leider nicht der Fall. Was tun?

Danke im voraus & Grüße ... Peter

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

2

Tuesday, November 25th 2008, 1:05pm

wird im nächsten update geändert - vorerst folgende lösung:

Jabaco Source

1
2
3
4
5
6
Public Sub Command1_Click()
   list1.AddItem "lala"
   list1.ListIndex = list1.ListCount - 1
   list1.ensureIndexIsVisible list1.ListIndex 
   
End Sub

Peter

Trainee

  • "Peter" is male
  • "Peter" started this thread

Posts: 69

Date of registration: Nov 24th 2008

Location: Cologne, Germany

Occupation: Second Vice President of Distributed Junk and Trash Development

  • Send private message

3

Tuesday, November 25th 2008, 1:11pm

Hallo Manuel,

wird im nächsten update geändert - vorerst folgende lösung:

danke für die schnelle Antwort! :)

Grüße ... Peter

Rate this thread
WoltLab Burning Board