![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2004
Posts: 6
Rep Power: 0
![]() |
Hello every1 !
I'm from Serbia and I'm a new user ! I've learned Pascal in school and I decided to make an aplication in Delphi. I make a form and beacuse that page is large i get a vertical scroll bar. But when i run in i can't use my scroll button on mouse ? Please help me ! |
|
|
|
|
|
#2 |
|
Expert Programmer
|
You need to trap your WM_MOUSE event, find out of the control you are trying to use has focus, and if it does programatically scroll you window down. If you check the Borland Development Network (BDN.BORLAND.COM) you will actually find a solution for this problem, I have seen it posted there before.
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Dec 2004
Posts: 6
Rep Power: 0
![]() |
I don't understant ?
|
|
|
|
|
|
#4 |
|
Newbie
|
I pressume when you talk about the scroll button on the mouse you're talking about the wheel?
If so, each form has a OnWheelMouseUp and OnWheelMouseDown event. Code in to these what you want to happen when the user moves the mouse wheel. For example: procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); begin // // Scroll the scrollbar down by 10 pixels Self.VertScrollBar.Position := Self.VertScrollBar.Position + 10; end; If you need any more help or don't understand, please let me know. Carl
__________________
Software developer since 1982, started on a ZX81. Been developing in Delphi since 1998. Currently trying to get my head round C++. |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Dec 2004
Posts: 6
Rep Power: 0
![]() |
Thank you Carl ! You helped me !
But there is one more thing. I learned Delphi in school and we learned it only for a few classes and I don't know how to set up little thing. For exaple : I want to fix the width of the windows. I don't want user to expand it, but he can because when cursor is changed into tho arrows he can do that ! And just to tell you that I have a verticall scroll on that page, and at the end of the page I want some blank space but deplhi always reduces it ? Can you help me ? |
|
|
|
|
|
#6 | ||
|
Newbie
|
Quote:
Quote:
Hope this helps. Happy Christmas Carl
__________________
Software developer since 1982, started on a ZX81. Been developing in Delphi since 1998. Currently trying to get my head round C++. |
||
|
|
|
|
|
#7 |
|
Newbie
Join Date: Dec 2004
Posts: 6
Rep Power: 0
![]() |
Thanx again.
In Serbia we first celebrate New Year and later Christmas ! Happy Christmas and New year ! |
|
|
|
|
|
#8 |
|
Newbie
Join Date: Dec 2004
Posts: 6
Rep Power: 0
![]() |
Hi !
Another little problem. I'm making some program and user must enter some number from 0 to 10 in edit1.text . But, how can i ban him to enter something else but number from 0 to 10 ? Because he can enter some strgin and my programme will crash. I can make my own procedure for this but it's large, so you might have some faster solution ? |
|
|
|
|
|
#9 |
|
Programming Guru
![]() ![]() ![]() |
you should make another thread for this question... you will get more / better responses.
the the type of the value with one of the isA functions... or type cast it to an integer value... compare that value to be >= 0 and/or <= 10.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#10 | |
|
Newbie
|
Quote:
If you visit http://www.torry.net you'll find an assortment of controls for almost every purpose. I highly recommend the JVCL which is a freeware suite of components. Takes some getting used to but well worth it. After all, why re-invent the wheel when someone has already done it? Carl
__________________
Software developer since 1982, started on a ZX81. Been developing in Delphi since 1998. Currently trying to get my head round C++. |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|