Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 29th, 2006, 11:28 PM   #1
nickm
Newbie
 
Join Date: Apr 2006
Posts: 2
Rep Power: 0 nickm is on a distinguished road
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.
Attached Images
File Type: jpg 1.JPG (20.0 KB, 20 views)

Last edited by nickm; Apr 29th, 2006 at 11:40 PM.
nickm is offline   Reply With Quote
Old Apr 29th, 2006, 11:34 PM   #2
jayme
Expert Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Ottawa, ON
Posts: 522
Rep Power: 13 jayme is on a distinguished road
Send a message via MSN to jayme
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.
__________________
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.
jayme is offline   Reply With Quote
Old Apr 29th, 2006, 11:47 PM   #3
nickm
Newbie
 
Join Date: Apr 2006
Posts: 2
Rep Power: 0 nickm is on a distinguished road
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.
nickm is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:30 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC