Announcement

Collapse
No announcement yet.

Command buttons w/o tabstop?

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

    Command buttons w/o tabstop?

    I have a form where I don't want the command buttons to receive focus when user tabs around. Can't find any way to accomplish that...

    I've searched the forums here as well, and all I found was a thread from August last year (concerning option buttons, admittedly, but it's the same issue) where Lance states he's posted the issue to R&D, and will be back as soon as they give him an answer

    I've searched MSDN ++ to find a message I could send to the button control to remove the tabstop, too, but to no avail...

    Can it be done??

    Thanks,
    Ketil


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

    #2
    Ketil --
    DDT engine includes WS_TABSTOP as default. To overwrite it you should specify own values (for example, %WS_CHILD).
    Code:
       #Compile Exe
       #Register None
       #Dim All
       #Include "Win32Api.Inc"
      
       Function PbMain
          Local hDlg As Long
          Dialog New 0, "Test", , , 200, 170, %WS_CAPTION Or %WS_SYSMENU To hDlg
          Control Add TextBox, hDlg, 101, "", 10, 10, 180, 40
          Control Add Button, hDlg, 102, "With Tabstop", 10, 55, 180, 15
          Control Add TextBox, hDlg, 103, "", 10, 75, 180, 40
          Control Add Button, hDlg, 104, "Without Tabstop", 10, 120, 180, 15, %WS_CHILD
          Control Add Button, hDlg, 105, "With Tabstop", 10, 140, 180, 15
          Dialog Show Modal hDlg
       End Function
    ------------------

    Comment


      #3
      Semen,

      Thanks a lot for solving my problem!! From what I had read I understood that the DDT defaults were the problem, but I just couldn't seem to find a "safe" value to add to avoid the defaults.

      I tried a couple of values that I knew were needed, but that didn't seem to make any difference.

      Thanks again!!

      Ketil

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

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎