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!

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

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.