New topic: 

Text character help.

<http://forums.realsoftware.com/viewtopic.php?t=33844>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        waveuponwave          Post subject: Text character help.Posted: 
Tue May 18, 2010 5:22 pm                                 
Joined: Fri Jan 29, 2010 12:39 pm
Posts: 229
Location: Virginia U.S.A.                I am making a keypad and I want to use 
the indexes as the values for the numbers 1,2,3 etc. when they are pushed. How 
can I alter this code so that when I press 5, the 5 stays in the text box when 
I press the next number. Like a calculator would display. I am sure it's very 
simple, I am just new to this. Thanks.

Code:  Dim strKeyPad As String
  strKeyPad = str(me.index)
  txtKeyPad.Text = strKeyPad      
_________________
RB2010r2 Pro on Win 7
I promise to help if I ever learn how to help myself.  
                             Top                 waveuponwave          Post 
subject: Re: Text character help.Posted: Tue May 18, 2010 5:33 pm               
                  
Joined: Fri Jan 29, 2010 12:39 pm
Posts: 229
Location: Virginia U.S.A.                Nevermind I got it. Is there a better 
way though?

Code:  Dim strKeyPad As String
  Dim strKeyHolder As String
  If txtKeyPad.Text = "" Then
  strKeyHolder = str(me.index)
  txtKeyPad.Text = strKeyHolder
  Else
  strKeyHolder = txtKeyPad.Text
  strKeypad = str(me.index)
  txtKeyPad.Text = strKeyHolder + strKeyPad
  End      
_________________
RB2010r2 Pro on Win 7
I promise to help if I ever learn how to help myself.  
                             Top                 timhare          Post subject: 
Re: Text character help.Posted: Tue May 18, 2010 5:34 pm                        
 
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 7779
Location: Portland, OR  USA                textKeyPad.AppendText strKeyPad   
                             Top                waveuponwave          Post 
subject: Re: Text character help.Posted: Tue May 18, 2010 5:36 pm               
                  
Joined: Fri Jan 29, 2010 12:39 pm
Posts: 229
Location: Virginia U.S.A.                Nice. I'll give it a try. Thanks.      
_________________
RB2010r2 Pro on Win 7
I promise to help if I ever learn how to help myself.  
                             Top                 waveuponwave          Post 
subject: Re: Text character help.Posted: Tue May 18, 2010 5:38 pm               
                  
Joined: Fri Jan 29, 2010 12:39 pm
Posts: 229
Location: Virginia U.S.A.                HA! My way worked though! This way is 
much better. Thanks Tim!      
_________________
RB2010r2 Pro on Win 7
I promise to help if I ever learn how to help myself.  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to