Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Center value in richtextbox, for strongm

Status
Not open for further replies.

sal21

Programmer
Apr 26, 2004
425
IT
Based on:
i have to the last 2 value an incorrect align...

25,00 is the price (i can have only a xx,yy, similar 56,00, 88,00.. ecc)

14/05/2023 is a date

see the image

i need:

25,00 14/05/2023

part of my code:

...
'REPARTO
STRINGA = Format("NOME", "!" & String(28, "@")) & Format("FIL", "@@@@@") & Format("NUM", "@@@@@") & Format("DS", "@@@@@") & Format("PREZZO", "@@@@@@@@") & Format("PER IL.", "@@@@@@@@@@")
Me.RichTextBox1.SelText = Me.RichTextBox1.SelText & STRINGA & vbCrLf
'REPARTO

'Me.RichTextBox1.Text = ""

Me.RichTextBox1.SelText = Me.RichTextBox1.SelText & "------------------------------------------------------------" & vbCrLf

With NOMI.LVSCONTRINO
For K = 1 To .ListItems.Count
If .ListItems(K).Checked = True Then
NOME = .ListItems(K).Text
FILA = .ListItems(K).ListSubItems(1).Text
COLONNA = .ListItems(K).ListSubItems(2).Text
DXSX = .ListItems(K).ListSubItems(3).Text
STRPRZ = .ListItems(K).ListSubItems(4).Text
DATA = .ListItems(K).ListSubItems(5).Text
STRINGA = Format(NOME, "!" & String(28, "@")) & Format(FILA, "@@@@@") & Format(COLONNA, "@@@@@") & Format(DXSX, "@@@@@") & Format(STRPRZ, "@@@@@@@@") & Format(DATA, "@@@@@@@@@@")
PRZ = PRZ + STRPRZ
NRPZ = NRPZ + 1
Me.RichTextBox1.SelText = Me.RichTextBox1.SelText & STRINGA & vbCrLf
End If
Next K
End With
...

note:
now th max length of NOME is 20 not 28

image of listview
 
Try

[tt]STRINGA = Format("NOME", "!" & String(27, "@")) & Format("FIL", "@@@@@") & Format("NUM", "@@@@@") & Format("DS", "@@@@@") & Format("PREZZO", "@@@@@@@@") & Format("PER IL.", "@@@@@@@@@@@")[/tt]

and

[tt]STRINGA = Format(NOME, "!" & String(27, "@")) & Format(FILA, "@@@@@") & Format(COLONNA, "@@@@@") & Format(DXSX, "@@@@@") & Format(STRPRZ, "@@@@@@@@") & Format(DATA, "@@@@@@@@@@@")[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top