![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
very simple question. make button change number in edit box
hi,
i am a complete programming beginner. i unfortunatley dont currently have time to learn programming because of school. in delphi, i have made a form. i have an edit box and 2 buttons on it. i have a 0 in the edit box. i want to make it so when i click on one button, the number in the edit box goes up, and the other, it goes down. is there a simple way to do this, or can you suggest another way to do this. (see attatched 1.jpg) i then have another of these edit boxes with to buttons next to it. i then want to multiply the number in the first edit box by 6, and add the number in the second box, then display the result in a third edit box. Last edited by nickm; Apr 29th, 2006 at 11:40 PM. |
|
|
|
|
|
#2 | |
|
Professional Programmer
|
Here's some psuedo-code:
if(up_button == pressed) boxnumber + 1 else if(down_button == pressed and boxnumber > 0) boxnumber - 1 Although, I'm not familiar with delphi, this is a pretty simple task if you have a decent amount of beginners knowledge in programming. Search google for the api you're using, for example, if you're using windows, search winapi.
__________________
▄▄▄▄ Quote:
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it. Download Code::Blocks now! ▄▄▄▄ |
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
thanks jayme
unfortunatley i dont have a decent amount of beginners knowledge in programming. i put you code into the program and tried to edit it to suit the project, but couldnt get it to work. since my first post, i edited my message abit, to show more info. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|