LB Booster
« Return key in a Textbox »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:34am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Return key in a Textbox  (Read 344 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Return key in a Textbox
« Thread started on: Jul 10th, 2014, 2:49pm »

A minor, but useful, difference between LBB and LB 4.04 is that you can use the ES_WANTRETURN stylebit to enable the Return (Enter) key in a TEXTBOX:

Code:
    nomainwin
    textbox #w.tb, 2, 0, 300, 320
    stylebits #w.tb, _WS_VSCROLL OR _ES_MULTILINE OR _ES_WANTRETURN, 0, 0, 0
    open "Return key in a Textbox" for window as #w
    #w "trapclose quit"
    #w.tb "Type some text and try the Return key."
    wait

sub quit handle$
    close #handle$
    end
end sub 

This works in many respects like a TEXTEDITOR, except that the Tab key moves focus to the next control rather than performing a tabulation function.

It's rather odd that you can't use the same trick in LB 4.04. As far as I know a TEXTBOX is just a regular Windows Edit Control (as it is in LBB), but for some reason in LB it doesn't respond to the ES_WANTRETURN stylebit as you would expect.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls