Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrolling form w\o scroll bars

Status
Not open for further replies.

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
 
I believe that i understand what you are looking for and i do not have the answer but think of it pure logically:
You whant to be able to scroll without scrollbars bu scrolling through progran....and the component are made as a MMI (Man - Mashine Interface) so logically: no scrollbars = no scrolling!!!
But is it not possible to make a very small scrollbar and adjust the colors so that it does not appear active???
I.e. selected color = passive color = frame color..... Totte
 
You could posibly just change the left position values of the components in question and use this as a suedo scroll action. Then you have to deal with the repaints and such.

Just an Idea.
 
1) How about just redrawing everything starting from the relevant position.

2) Ever thought of scrolling the Athena Widget way? Your form is basically a window on a scroll. If you drag a point on the form up or down and the background changes accordingly.
 
instead of changing the top/left properties for all controls on the form you could move the controls to a panel.
scrolling is a lot easier by just moving a single control.
 
good idea. I'm gonna try to do a spinoff of the pseudoscroll thing, and putting everything on a panel may very well work. I'll try either.

Thanks Cyprus
 
a slight alteration of the suedo scroll action will also resize a component such as a edit box. You can use the
onmousedown, up,move methods to change the size of a component at runtime. Its like a slider only different.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top