|
VB 4/6- und VBA-Forum - Beitragsübersicht - |
|
Thema | VB6: Label anordnen |
Von |
VBangel |
Datum |
14. Juni 2018 um 09:17:21 |
Frage |
Hallo, ich wollte 10 Labels untereinander zur Laufzeit erstellen und das 11. Label soll neben LblOutSide(0) erscheinen und dann wieder 10 Labels untereinander usw.Private Sub LblTextOK_Click() If los < 49 Then 'Anzahl auf 50 begrenzen If los < 9 Or los < 19 Then '<<<< soll die Anzahl festgelegt werden aber ich bekomms nicht hin :-( If los = LblOutSide.UBound And LblOutSide(los).Caption <> "" Then Load LblOutSide(los + 1) LblOutSide(los + 1).Move LblOutSide(los).Left, LblOutSide(los).Top + LblOutSide(los).Height + 120 LblOutSide(los + 1).Caption = "" LblOutSide(los + 1).Visible = True End If End If If los = 9 Then If los = LblOutSide.UBound And LblOutSide(los).Caption <> "" Then Load LblOutSide(los + 1) LblOutSide(los + 1).Move LblOutSide(los).Left + LblOutSide(los).Width + 120, LblOutSide(0).Top LblOutSide(los + 1).Caption = "" LblOutSide(los + 1).Visible = True End If End If End If LblTextOK.Visible = False: LblTextCancel.Visible = False: TxtOutSide.Visible = False End Sub Danke |
|
Antwort: |
Von |
Neptun |
Datum |
14. Juni 2018 um 18:50:44 |
Antwort |
Hallo VBangel, ändere den Code mal so: Dim XPos&, YPos& If los < 49 Then ' Anzahl auf 50 begrenzen If los = LblOutSide.UBound And LblOutSide(los).Caption <> "" Then los = los + 1 With LblOutSide(0) XPos = .Left + (.Width + 120) * (los \ 10) YPos = .Top + (.Height + 120) * (los Mod 10) End With Load LblOutSide(los) With LblOutSide(los) .Move XPos, YPos .Caption = "" .Visible = True End With End If End If LblTextOK.Visible = False: LblTextCancel.Visible = False: TxtOutSide.Visible = False Gruß,
Neptun |
|
[ Antwort schreiben | Zurück zum VB 4/6- und VBA-Forum | Forum-Hilfe ] |
|
Letzte Aktualisierung: Sonntag, 13. Dezember 2015 |
|