2024-02-08
01:00 AM
- last edited on
2024-02-08
11:58 PM
by
Lina_DABASINSKA
Good morning , sorry if i'm not posting in the right place but i'm still learning. I have a problem with an example i saw in the tutorial where you bild an iterface to adjust the hour and minutes . In the tutorial where i built the interface it says to copy the code and put it in two files .... i tired but when i press the buttons mothing happens and in the two text areas thereare two question marks. Could someone kindly help me? Thank you so much.
Solved! Go to Solution.
2024-02-12 05:51 AM
Ok i understood where i was wrong , now the meters work. You were very kind
2024-02-12 05:58 AM
My pleasure! :)
2024-02-12 06:21 AM
If I can I still take advantage of the availability. Can I make it so that this clock can also be used in other applications without having to build it all the time in each new project? Thanks
2024-02-12 06:30 AM - edited 2024-02-12 06:30 AM
Yes you can do that.
You will have to create a custom container (also called a custom widget) : custom widgets
To do so, you basically have to create your clock inside a custom container :
Once you are done, right click on the name of your custom container and click export :
Make sure to change the name of the typography you will use (don't keep it called "default") otherwise you will have errors when importing it from another project.
Once you exported your custom container, it will be saved as a .tpkg file in your project's folder.
Finally, you can import it in another project by clicking edit, import and then custom container :
Regards,
2024-02-12 08:35 AM
ok thanks a lot. I'll try
2024-02-13 02:09 AM
You are really very prepared...... you already know all the problems I will face. I already noticed that I had to change the names in the typography. I noticed that when I launch the simulator in the custom container I have no errors but the screen remains black. if I export it and then import it into a project it shows correctly. Is this normal, am I doing something wrong? Thanks so much and have a good day
2024-02-13 03:04 AM
Hello @StefanoL ,
It is good habit to post only one question per thread. If you have a new question you should create a new thread.
When you have a black screen, are you sure you have something on your screen1?
If you created your clock in a custom container and then run, you won't see your clock. You need to go to your screen and then add the custom container you created just like you would add any widget (ex: button, box, text area).
If you did that and you have a black screen, try adding something else to your screen (like a green box) and see if it is still black.
Regards,