Loading ...
Sorry, an error occurred while loading the content.

TAB key

Expand Messages
  • green8819
    I am typing some text in a textbox1. When I press the TAB key, the cursor jumps to the next contol. But what I want is, move cursor TAB(n) spaces in textbox1.
    Message 1 of 3 , Sep 22, 2013
    • 0 Attachment
      I am typing some text in a textbox1.
      When I press the TAB key, the cursor jumps to the next contol.
      But what I want is, move cursor TAB(n) spaces in textbox1.
      Any help appreciated. Is it possible to stop the "jumping"?

      '----code start
      nomainwin
      WindowWidth = 500 :WindowHeight = 200
      UpperLeftX=10 :UpperLeftY=10
      textbox #w.tbx1,  35,  30, 170,  50
      textbox #w.tbx2, 290,  30, 165,  50
      button #w.btn,"Button",[btnClick], UL,40,100,95,25
      statictext #w.stx, "StaticText", 290, 110,  80, 20
      open "" for window_nf as #w
      #w, "font arial 10" :#w, "trapclose [quit.w]"
      #w.tbx1 "!setfocus"
      wait
      [btnClick]
      wait
      [quit.w]
      close #w
      END
      ''----code end
    • Mike -
      One solution is to use the texteditor. No jumping here. But I want to use the textbox. ________________________________ From: skynetmike@yahoo.com
      Message 2 of 3 , Sep 22, 2013
      • 0 Attachment
        One solution is to use the texteditor. No 'jumping' here.
        But I want to use the textbox.



        From: "skynetmike@..." <skynetmike@...>
        To: libertybasic@yahoogroups.com
        Sent: Sunday, September 22, 2013 5:19 PM
        Subject: [libertybasic] TAB key

         
        I am typing some text in a textbox1.
        When I press the TAB key, the cursor jumps to the next contol.
        But what I want is, move cursor TAB(n) spaces in textbox1.
        Any help appreciated. Is it possible to stop the "jumping"?

        '----code start
        nomainwin
        WindowWidth = 500 :WindowHeight = 200
        UpperLeftX=10 :UpperLeftY=10
        textbox #w.tbx1,  35,  30, 170,  50
        textbox #w.tbx2, 290,  30, 165,  50
        button #w.btn,"Button",[btnClick], UL,40,100,95,25
        statictext #w.stx, "StaticText", 290, 110,  80, 20
        open "" for window_nf as #w
        #w, "font arial 10" :#w, "trapclose [quit.w]"
        #w.tbx1 "!setfocus"
        wait
        [btnClick]
        wait
        [quit.w]
        close #w
        END
        ''----code end


      • Stefan Pendl
        ... Using the TAB key to move from one control to the next in the tab-order is essential to all GUI systems on Windows, Linux, Mac, etc. To turn this default
        Message 3 of 3 , Sep 22, 2013
        • 0 Attachment
          Am 22.09.2013 11:54, schrieb Mike -:
          >
          >
          > One solution is to use the texteditor. No 'jumping' here.
          > But I want to use the textbox.
          >

          Using the TAB key to move from one control to the next in the tab-order
          is essential to all GUI systems on Windows, Linux, Mac, etc.

          To turn this default behavior off, you would need a third party DLL and
          a bunch of API functions.

          I would not want to work against the system, but with the system.

          The text editor is a custom control of LB, so the entire key handling is
          done by itself instead of Windows.


          --
          Stefan Pendl
          http://stefanpendl.runbasichosting.com/

          LB 4.04 Pro ... http://www.libertybasic.com/assist.html
          LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

          LB Community Wiki .............. http://basic.wikispaces.com/
          LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
          LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

          Books at http://www.lulu.com/ and http://www.amazon.com/
          Alyce Watson ... APIs for Liberty BASIC
          Carl Gundel .... Beginning Programming with Liberty BASIC

          Windows 7 Home Premium 64-bit SP1
          AMD Turion X2 RM-70 2GHz, 4GB RAM
        Your message has been successfully submitted and would be delivered to recipients shortly.