Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am new to VB 6.0 ( From .net)

I want to create a textbox with bullets and enable indenting too. I know i can achieve this using the RTB control<just by="" setting="" few="" properties="">, but i should achieve this using a textbox.Please provide assistance.

Thanks in advance
Posted

First of all, VB6 is crap, why are you using it ?

You know the right tool for the job ( a RTB control ), but instead want to use a control that doesn't support what you want ? Unless you find a font that includes the bullet, a text box can't do what you want. That's why the RTB control exists.
 
Share this answer
 
Comments
MohamedHassanAli 21-Jun-11 8:31am    
Thanks for the Quick reply Christian.
I do agree Vb is not as good as .Net and believe me i know it better than anyone else does. As for why i am using VB 6 u so dont want to know. I am working on an application made on VB 6. Is there anyway i can achieve bulleting in TextBox ?
Nagy Vilmos 21-Jun-11 10:05am    
Answer with editorial, good call.
MohamedHassanAli 22-Jun-11 0:08am    
I am sorry Nagy. I dint get you ..
Believe it or not, I will soon be tasked with providing an update to a VB6 project. I asked them if they want it to be migrated to VB.NET or C#.

They said no. Since they sign my checks, I say yes boss.

Per the OPs question, you can do something to mimic what you ask for.

You can add a tab space to indent the text box. ASCII tab chr(9) and choose an character to represent a bullet. The example below uses an asterisk, just make sure the symbol you chose is a font that is readily available on most PCs.

Assure that the textbox is set to multiline.

VB
Private Sub cmdList_Click()
    Text1.Text = "This line is not indented." & vbCr & vbLf
    For i = 0 To 255
        Text1.Text = Text1.Text & Chr(9) & Chr(42) & " Line " & i & vbCr & vbLf
    Next
End Sub
 
Share this answer
 
Comments
MohamedHassanAli 22-Jun-11 0:11am    
very nice one Houghtelin. They sign our checks we do have to say Yes Boss :D.
I will modify this code to meet my requirements. I still have a lot to do with this textbox( Auto Alignment and other stuffs).

Good Luck with your new assignment.
Thanks Again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900