0

Hi all,

I recently started with visual c# .NET and I really liked it. I hope I can learn a lot from you.

I am making a simple program, but I have problem with dynamicly changing text for a lable.

Imagine that there is a lable and we should have 3 characters in it. and there are 3 groups of buttons that each have 3 buttons (so totaly 9 buttons and each group responsible for one character of the lable). something like:

A B C
D E F
G H I

I want to make something so if for example you click on A and then E and then I the text for lable will be ABE

and after this if you click H the last character of lable should change to H and so on.

I know with something like this.lable.Text += blah blah you can append text. but for making it dynamic as example above I need some help please!

Thanks!

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Sean87
0

Sorry I made a mistake I mean by clicking A, E and I the string should be AEI and later if you click B it should be BEI

0

You should have some sort of char array.
For indexing, the mod operator(%) may come in handy here.

0

can you give more details please? a little example would be nice.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.