How do I create a big calculator using buttons?
BlitzPlus Forums/BlitzPlus Beginners Area/How do I create a big calculator using buttons?
| ||
I want to put a big calculator type layout on my screen, with big keys, a different coloured background for each key and a BIG centred text showing the number (and to store the number in a variable when clicked). I'm sure I need to know how to use gadgets/panels and the button feature etc. but I'm struggling to find some decent tutorials on it. So: - Can anyone advise on how to set up calculator (preferably with code) - can anyone point me towards a good basic tutorial on Events/panels/gadgets (I'm aware of the one from the BlitzPlus Homepage) - are there any others around? Many thanks |
| ||
About the background for keys: blitz buttons are simply the buttons of your OS .. there're no native imagebuttons.. (tho I've seen something once in some topic, but it was using external stuff iirc..) |
| ||
Thank you very much - very useful - if you happen to remember the background solution and font size please could you let me know. Thanks again for your time and quick response. |
| ||
As far as the font size goes:window=CreateWindow("calc example - WolRon",0,0,384,384) font = LoadFont("Arial", 34) button0=CreateButton("0",120,244,48,48,window) SetGadgetFont button0, font buttondot=CreateButton(".",168,244,48,48,window) SetGadgetFont buttondot, font buttonis=CreateButton("=",216,244,96,48,window) SetGadgetFont buttonis, font Repeat WaitEvent() If EventID()=$803 quit=True Until quit End |