dynamic editable buttons on windows form?
Hi there,
Ok, I'm in trouble.
I designed an onscreen keyboard for a registration system in restaurants that can be handled by touchscreen (65 buttons).
The text and name of the buttons need to be dynamicly loaded with data from my database.
I can put it in hard code (but I am lame and dont want to write those few lines 65 times).
dim thisButton as clsButton = new clsButton()
thisButton = thisButton.findByPK("btn1")
btn1.text = thisButton.addText
this works fine but I want to put in in a for ... next loop.
The problem occurs when I need to define wich button needs to be set.
I need something like
for ...
strText = "btn" & i
me.controls(strText).text = thisButton.addText
next ....
Offcourse this doesn't work cause strText is string and not of type button.
Who can help me how I can convert the string to type button and still have it pointing to the button I named btn1.
Hope someone in the WWWorld can help me.
This is my final project before I graduate.
Thank you.
Frank
Frank
__________________
Frank Vandeven
Belgium
|