Project

General

Profile

Actions

Bug #856

open

UI Text box hold last char in buffer

Added by Paul Kitching about 3 years ago.

Status:
New
Priority:
Normal
Target version:
Start date:
10/24/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

If I enter some text in a text box, then check for a key press, it will return the last character entered in the text box.

e.g.

#splashScreen:False
#googleFont:"baloo"
curs off:flash off
global cont

cont=false
UIScreen1
while not cont
    wait vbl
wend
do
    k$=inkey$
    s=scancode
    if s<>0 then print s
    wait vbl
loop


// ##*AOZUIDesignerGeneratedCode*##
Procedure UIScreen1
// ********************************************************************************
// The contents of this procedure is generated by the UI Designer.
// Do not modify the contents of this procedure with the code editor.
// ********************************************************************************
UI TextBox "UITextBox0", x=10, y=10, width=300, fontName$="baloo"
UI Button "UIButton1", x=10, y=100, width=150, height=50, content$="button", fontName$="baloo", onClick$="PRESS"
End Proc

Procedure PRESS[ID$]
    // Add your onClick$ code here
    ui cls
    cont=true
End Proc

A Clear Key after the Wend will fix it, but shouldn't be needed.

No data to display

Actions

Also available in: Atom PDF