[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

How do I set Tab Stops in VB.Net Rich Text Boxes?

I am programming in Visual Basic .NET and I wish to set tab stops in various text boxes.  The SendMessages and LB_SETTABSTOPS does not work for BV.NET like it does in VB6.
0
Harold_Lominac
Asked:
Harold_Lominac
  • 2
  • 2
1 Solution
 
rkellowCommented:
Hi Harold,

First, make sure that the TabStop property for each of the controls you want to have a tabstop is set to True.  Then set the TabIndex value for each control to the order you want the tabstops to be in (first control TabIndex = 1, second control TabIndex = 2, etc.).

I hope that helps.

--Rob
0
 
Harold_LominacAuthor Commented:
Thanks for replying Rob.  Perhaps I used the wrong terminology.  When I am in a rich text box, for example, and I press the Tab key, the cursor moves to the nearest tab stop within the text box.  It is similar to Microsoft Word.  I wish to set the positions in the document so I can have fields line up.  IN VB6 I can use LB_SETTABSTOPS and SendMessage to do this, but this doesn’t work in VB.NET.
0
 
Harold_LominacAuthor Commented:
Well I think I found the answer myself.
The tabs are set for highlighted text only.
Use the SelectionTabs member as:
      Dim ListBoxTabs() As Integer = {100, 300}
      RTB.SelectionTabs = ListBoxTabs
This portion is executed when a button is pressed.
The tab stops are applied to the highlighted text.
0
 
rkellowCommented:
That's fine... I didn't understand the original question.

--Rob
0
 
ee_ai_constructCommented:
Question answered by asker or dialog valuable.
Closed, 125 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now