Solved

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

Posted on 2004-10-30
303 Views
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.
0
Question by:Harold_Lominac
    5 Comments
     

    Expert Comment

    by:rkellow
    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
     

    Author Comment

    by:Harold_Lominac
    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
     

    Author Comment

    by:Harold_Lominac
    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
     

    Expert Comment

    by:rkellow
    That's fine... I didn't understand the original question.

    --Rob
    0
     

    Accepted Solution

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    884 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now