status bar help

keko2004

Active member
Joined
Feb 13, 2006
Messages
39
Location
Middle Village, NY
Programming Experience
1-3
hey guys. im building a small little calulator. i have finished most of it for the most part. i created a statusbar(for extra credit) to display the equations that the user wants processed. the only hting is that lets say when a user enter the number 225, and realizes that its 224 not 225. the user hits delete and it removes the 4 from my displaybox. but i cant get it to remove from the status bar. any help?

this is the block for my delete button

VB.NET:
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] backBtn_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] backBtn.Click
[/SIZE][SIZE=2][COLOR=#0000ff]    Try
[/COLOR][/SIZE][SIZE=2]        test = displayBox.Text.Length
         remove = displayBox.Text.Remove(test - 1, 1)
         displayBox.Text = remove
[/SIZE][SIZE=2][COLOR=#0000ff]    Catch[/COLOR][/SIZE][SIZE=2] ex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Exception[/SIZE]
[SIZE=2]        'display error'
[/SIZE][SIZE=2][COLOR=#0000ff]     End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub
[/COLOR][/SIZE]
 
you first say you write to status bar, then you ask us how to write to statusbar !?
 
but you do exactly the same thing with "displayBox.Text"... I don't understand your problem with "statusbar.Text" or whatever you called it.
 
got it never mind.the problem was that is wasnt erasing numbers for the status bar, it was just adding them on. it was an error in a function that i was using. sorry about the inconvienence.
 
Back
Top