Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Responding to scrolling of the main form

When I choose to resize the visible window of my app, scrollbars automatically appear, of course.

However, I would like to re-position one of the controls so that it is always visible, no matter where the window is scrolled.

Is there an event (for TForm or Screen, perhaps) that I can use, so that I can identify the current portion of the main form now visible, and use the info to position the desired control (via its .left and .top property) ?


Comments

  • zibadianzibadian Member Posts: 6,349
    : When I choose to resize the visible window of my app, scrollbars automatically appear, of course.
    :
    : However, I would like to re-position one of the controls so that it is always visible, no matter where the window is scrolled.
    :
    : Is there an event (for TForm or Screen, perhaps) that I can use, so that I can identify the current portion of the main form now visible, and use the info to position the desired control (via its .left and .top property) ?
    :
    :
    :
    You can use the Anchors property for that. Earlier versions of Delphi didn't feature the Anchors property, so you needed to calculate the position in the OnResize() event.
Sign In or Register to comment.