on 11-02-2015 12:07 AM
I am trying to learn DS. I want to know how I would change the text on a Button to the current date. I searched and could not find any examples. Can someone tell me how I would do this?
Thanks.
Look at this thread How to display "current date -1" means yesterda... | SCN
application.getinfo method as mentioned in this thread - please try that and see if it meets your needs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandy
If you want to set the text in the button in the initial. you can write the code in the event "On startup".
How to find the startup.
1.Click the Application layer in the outline.
2. In the properties, you can find "On startup" in the "Event" section.
If you want to write the code which is interactive.
Write the code in the "On click" which in the each component' properties.
Hope this help.
Willy
I'd not regard setting the text in the application startup script to be a best practice. A year from now, you'll have the app open for tweaking and you'll have forgotten where you were setting the date.
Set data minding on the button's text property and use a formatter function to set the text. It's cleaner this way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.