cyprus106
Programmer
- Apr 30, 2001
- 654
I've got a maximized form without a border and the HorizScrollBar and VertScrollBar properties turned off.
There is additional material off to the side of the form, out of view. Basically, this is an addition to the grid question I was asking earlier. A lot of the grid goes off screen. When the user goes to the edge of the form, I need the form to be able to scroll over. I can't scroll the grid over instead because of all of the stuff on top of it.
I definately can't have the form's scroll bars visible in the program, so I figured I would change them to be invisible but when I needed to scroll the form over, I'd just add a few to the scroll bar's position. That didn't work. When it was invisible, it was disabled. I tried making the (horizontal) scroll bar's height to be 1, (0 makes it the default size) and it was hardly visible, but it changed colors when hovered over and the regular colors were a dead giveaway that something was definately there. I can't have that.
What I've got now is a custom component (TFiller, a decendent of TSplitter) that is transparent, sitting on the edge of the visible portion of the form. I added OnMouseEnter and OnMouseLeave events to the component. When the mouse hovers over the filler, it's set to repeatedly scroll the scroll bar over (the component itself scrolls too, so that it's always at it's respective edge of the screen) until the OnMouseLeave event is called. This system would work ok except that it's using the form's scroll bar, which I can't have because the stupid thing's still visible.
I, for the life of me, can't figure out how to scroll the form over without it's scroll bar. Does ANYBODY know how to go about doing this?
If that's too confusing or not informative enough, let me know.
Thanks, Cyprus
There is additional material off to the side of the form, out of view. Basically, this is an addition to the grid question I was asking earlier. A lot of the grid goes off screen. When the user goes to the edge of the form, I need the form to be able to scroll over. I can't scroll the grid over instead because of all of the stuff on top of it.
I definately can't have the form's scroll bars visible in the program, so I figured I would change them to be invisible but when I needed to scroll the form over, I'd just add a few to the scroll bar's position. That didn't work. When it was invisible, it was disabled. I tried making the (horizontal) scroll bar's height to be 1, (0 makes it the default size) and it was hardly visible, but it changed colors when hovered over and the regular colors were a dead giveaway that something was definately there. I can't have that.
What I've got now is a custom component (TFiller, a decendent of TSplitter) that is transparent, sitting on the edge of the visible portion of the form. I added OnMouseEnter and OnMouseLeave events to the component. When the mouse hovers over the filler, it's set to repeatedly scroll the scroll bar over (the component itself scrolls too, so that it's always at it's respective edge of the screen) until the OnMouseLeave event is called. This system would work ok except that it's using the form's scroll bar, which I can't have because the stupid thing's still visible.
I, for the life of me, can't figure out how to scroll the form over without it's scroll bar. Does ANYBODY know how to go about doing this?
If that's too confusing or not informative enough, let me know.
Thanks, Cyprus