Announcement

Collapse
No announcement yet.

TabKey and TEXTBOX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TabKey and TEXTBOX

    Dear forum!

    What is simpliest way to change TAB key behaviour in DDT TEXTBOX? I don't need to shift focus to next control, I want to insert CHR$(9) char in edited text.

    Thanks in advance

    Cezary Zielinski

    ------------------

  • #2
    1) subclass DDT dialog
    or
    2) no other controls should have tabstop
    or
    3) Use CTRL-TAB



    ------------------
    [email protected]
    hellobasic

    Comment


    • #3
      Unlike I think that Ctrl-Tab is best idea, you can "switch off" Tab for alone textbox by following way.

      Instead of
      Code:
            Dialog Show Modal hDlg Call DlgProc
      Code:
            Dialog Show Modeless hDlg Call DlgProc
            Local Msg As tagMsg
            While GetMessage(Msg, %NULL, 0, 0)
              If Msg.hWnd = GetDlgItem(hDlg, %ID_TEXTBOX) Or IsFalse(IsDialogMessage(hDlg, Msg)) Then
                 TranslateMessage Msg
                 DispatchMessage Msg
              End If
            Loop
      plus in DlgProc
      Code:
               Case %WM_DESTROY: PostQuitMessage 0
      Should note, that some guys don't like mixing DDT' & SDK' styles.

      ------------------

      Comment


      • #4
        It is not an offically sanctioned technique, but many report success with it... it it works then great, otherwise... well... um...

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment

        Working...
        X