[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


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

Posted on 2004-10-30
Medium Priority
Last Modified: 2012-05-05
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.
Question by:Harold_Lominac
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 12454611
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.


Author Comment

ID: 12456311
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.

Author Comment

ID: 12456459
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.

Expert Comment

ID: 12465114
That's fine... I didn't understand the original question.


Accepted Solution

ee_ai_construct earned 0 total points
ID: 12506821
Question answered by asker or dialog valuable.
Closed, 125 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question