LB Booster
« Long text input? »

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: Long text input?  (Read 940 times)
Monkfish
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 104
xx Re: Long text input?
« Reply #10 on: Feb 12th, 2015, 7:20pm »

Thanks for the pointers smiley
This now seems to work...

text$=""
WindowWidth=400
WindowHeight=200
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
textbox #main.tbx, 10, 10, 330, 150
stylebits #main.tbx, _WS_VSCROLL OR _ES_MULTILINE, _ES_AUTOHSCROLL, 0, 0
button #main, " OK ", [accept], UL, 345, 72
open "Edit the text and then press OK" for Dialog as #main
print #main, "trapclose [ignore]"
print #main, "font courier_new 12 bold"
print #main.tbx, sampletext$
pos=len(sampletext$)
hTextbox=hWnd(#main.tbx)
CallDLL #user32, "SendMessageA", hTextbox as Ulong, _EM_SETSEL as Long, pos as Long, pos as Long, result as Long
wait

[accept]
flg=1
print #main.tbx, "!contents? text$"
close #main
end

[ignore]
flg=0
close #main
end
« Last Edit: Feb 12th, 2015, 7:34pm by Monkfish » 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