Folgendes ist die SUB "AddTextBox":
Code: Alles auswählen
Sub AddTextBox(x As Integer,y As Integer,w As Integer,ByVal id As Integer,ByVal num As Integer)
Dim As String text
Dim As Integer textz,inum
Line (wx(num)+5+x,wy(num)+26+y)-(wx(num)+5+x+w,wy(num)+42+y),15,BF
Line (wx(num)+5+x,wy(num)+26+y)-(wx(num)+5+x+w,wy(num)+42+y),15,B
Line (wx(num)+5+x,wy(num)+26+y)-(wx(num)+4+x+w,wy(num)+26+y),8
Line (wx(num)+5+x,wy(num)+26+y)-(wx(num)+5+x,wy(num)+41+y),8
Line (wx(num)+6+x,wy(num)+27+y)-(wx(num)+4+x+w,wy(num)+41+y),7,B
Line (wx(num)+6+x,wy(num)+27+y)-(wx(num)+6+x+w-3,wy(num)+27+y),0
Line (wx(num)+6+x,wy(num)+27+y)-(wx(num)+6+x,wy(num)+40+y),0
If (mx>wx(num)+5+x And mx<wx(num)+5+x+w) And (my>wy(num)+26+y And my<wy(num)+42+y) And buttons=1 Then
inum=1
End If
If inum=1 Then
Color 0
'Select Case key2
' Case 32 To 255
key2=Inkey
text=text+key2
textz=Len(text)*8
Draw String(wx(num)+8+x+textz,wy(num)+28+y),text
' Case 13
' Draw String(wx(num)+8+x,wy(num)+28+y),text
' End Select
End If
End Sub
Wenn ich auf das Feld klicke, dann sollte man eigentlich den Text eingeben können, allerdings muss ich die Taste gedrückt halten und es erscheint immer nur für sehr kurze Zeit ein einzelner Buchstabe :-/