CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    The Volunteer State - USA
    Posts
    90

    How to disable TabStops

    I would like to disable some (or all) TabStops in a dialog box.
    the following:
    dlg.m_MyWord.TabStop=FALSE;

    produces the error: TabStop is not a member of CString.
    where m_MyWord identifies a ReadOnly edit window.
    What did i do wrong?
    TIA
    --------------------------------------------
    http://www.volfirst.net/~sirjorj/index.html
    ---------------------------------------------

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626
    I'm guessing you're used to VB ? MFC apps don't usually have those kinds of 'properties'.
    Enableing/Disabling tabstop will take a bit more effort than that.

    I'm assuming here that m_MyWord is a control variable (CEdit ?) and not a regular value type (int, word, dword...)

    In that case, you'd use following:
    to enable tabstop:
    m_MyWord.ModifyStyle(0, WS_TABSTOP);
    to disable tabstop
    m_MyWord.ModifyStyle(WS_TABSTOP, 0);

  3. #3
    Join Date
    Oct 2002
    Location
    St. Louis
    Posts
    27
    Using MFC, at design time you can just uncheck the "Tab Stop" check box

  4. #4
    Join Date
    Aug 2001
    Location
    Sydney, Australia
    Posts
    813
    Alternatively you can put some code in the OnTabStop functions if you want it to do really neat things which VB can't do
    Microsoft LVP - Least Valuable Professional

    Please rate this post... Pleeeeeeaaassee!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured