If i use DrawObject in roScreen, is possibile delete this object in a second time?
screen = CreateObject("roScreen")
screen.SetMessagePort(port)
screen.Clear(&hFFFFFF00)
bitmap=CreateObject("roBitmap", "pkg:/images/header.png")
id = screen.DrawObject(0, 124, bitmap) 'this line is bad, how i replace it for get id of element?
screen.show()
' ========= HOW REPLACE THIS BAD CODE WITH CORRECT CODE? EXAMPLE DELETE DRAWOBJECT IF I PRESS UP BUTTON ========
while true
msg = wait(0, port)
if type(msg) = "roUniversalControlEvent" then
code = msg.GetInt()
if (code = 0) 'back button
return -1
else if (code = 2) 'up button
screen.DeleteObject(id) 'this line is bad, how i replace it for delete element from id?
end if
end if
end while
'=============================================
Regards,
Patryk Rzucidlo (PTKDev)
Find me on social, forum and app with nickname "PTKDev".
Portfolio: http://www.ptkdev.it
Skype: ptkdev | Twitter: @ptkdev | LinkedIN: ptkdev | CurriculumVitae: http://cv.ptkdev.it