FrankA

NA Dynamic button text?

3 posts in this topic

Hi,

I'm working on a projects where i need the button text to be dynamic.(assigned by a string variable)

i have not been able to figure out how to accomplish this easily.

I made a workaround with placing a label over the button and have the label refer to a string, but it would be soo much easier and smoother to just have the button text assigned a variable.

I would think i could access the the text field through code ,like: Btn_1.Text=My_Btn_String_1, but have had no luck with this.

Would Greatly appreciate any help.

Thanks, Frank.

 

Share this post


Link to post
Share on other sites

Thanks Mr Bits n Bytes!

looks like i had the code right, but i did not have a proper call to the subroutine that assigned the variable to the 'Button.Text'.

the example with dynamic list box sortet it out for me.

Still, to me, it makes more sense if it was an option to have the text refer to a string in the property of the button...

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now