TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

escape in dialog,endDlog, boxes

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
chainer



Joined: 25 Feb 2007
Posts: 17

PostPosted: March 12, 2007 8:26 PM    Post subject: escape in dialog,endDlog, boxes Reply with quote

okay, so i have another question.

is it possible, that when there is a dialog box, and it says, enter=ok, esc=cancel.

how do i but in the code so that when you press esc, it really does cancel?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
mellamokb



Joined: 10 May 2007
Posts: 100

PostPosted: May 18, 2007 3:15 PM    Post subject: Reply with quote

Hi chainer,

Yes, it is possible. There is a system variable aptly called 'ok' which either has a value of '1' ([ENTER] was pressed) or '0' ([ESC] was pressed). After displaying your dialog, simply check the state of the 'ok' variable to control the flow:

Code:

@Display dialog here

If ok=0 Then
@Code to react to escape
Else
@Code to react to enter
End If

@Code to run afterward



Hope this helps!

~ mellamokb
Back to top
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |