[Gambas-user] It wil not work, anyone a idea what is wrong
ron
ronstk at ...239...
Sat Apr 3 11:23:06 CEST 2004
Hi
I'm feeling realy stupid, no not a yoke.
Public sub button1_KeyPress() 'add \n and key.code
Report( "button1_KeyPress()" & " Key.Code=" & Key.Code)
end
PRIVATE SUB Report (ReportIn AS String)
DIM key AS String
DIM Report AS String
DIM KeyText AS String
DIM iPos AS Integer
iPos=Instr(Report," ") 'find 1' space must be \n
PRINT iPos '< allways 0
Report = ReportIn
keyText = ""
IF iPos>0 THEN
Report =Left$(reportIn,iPos-1)
keytext =Mid$(ReportIn,iPos+1)
ENDIF
.....
' some other stuff
' keytext involved but is not changed
....
IF listview1.Count>10 THEN
listview1.MoveFirst
key=listview1.Key
listview1[key].Delete
ENDIF
' note: the delete here triggers a developer message
'CTREEVIEWITEM_delete < 0x8120450 0x8151848
'CTREEVIEWITEM_delete > 0x813f630
'popups de console box
INC idx
key = Report & CStr(idx)
label1.Text=Report '<-- here the Key.Code occurs but may not.
listview1.Add(key,Report)
end
First I used \n instead of the space, what should be the right one
to get in label1 two lines of text.
And no Benoit it's not my first progam :)
But what I'm doing wrong?
More information about the User
mailing list