Re: Scrollbar sanity

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Okay! Got it figured out. If I make a tiny line object(or other object,
such as a blank label or something) and set it to move dynamically on form
refresh to be at the lower-right hand corner of my container, then life is
good. Apparently something has to MOVE into an off-form area, as opposed to
just being STRETCHED into it at runtime if you want the scrollbars and
refresh to behave correctly during runtime.

Cheers!

-LS




news:Xns992261542E068LiskaStation@xxxxxxxxxxxxx:

Another fun challenge!

Okay, I'm trying to add a GUI to a program that a client specifically
requested. Here's the deal though - it's going to have a lot of
dynamically moving elements (...yay.)

Here's the thing. I'm trying to get the scrollbars to cooperate, and they
won't.

For example, if I put a container class on the form (with scrollbars
enabled) and then put a command button in the container, I can then put
the
following code in the click button's CLICK event (bear in mind this is a
test to simulate what I want it to do when there's LOTS of controls
inside
the main container class):

this.top = this.top + 500 && takes it off the bottom of the form
IF this.Parent.Height < (this.Top + this.Height) && the container isn't
big
enough
this.Parent.Height = this.Top + this.Height && expand the parent
ENDIF
**Code for horizontal omitted
this.Parent.Refresh && doesn't help
thisform.Refresh

Well, the CONTAINER gets bigger, and although they act a tad werid, the
scrollbars seem to work, kinda sorta, but the container itself doesn't
refresh, and I can't see the command button in it until I click it again
(meaning I have to do a little scavenger-hunt type click-around until I
find it). Also the form screen will randomly go black on me and then skip
back to being grey during some iterations of the code. This was when I
was
getting close to command1.TOP=70000 or so, and I'm guessing that probably
shouldn't be a real surprise.

Anyone have any idea why this happens and how to solve? I'm not really
seeing in the vfp9 docs anything that might help. I know in VFP 6/7
there
was a limit on scroll size (double screen resolution), but that doesn't
appear to be the case here, as I've gotten it to somewhere around HEIGHT
=
20000 to 25000 by simply assigning a huge value to "Top" to random items
on
the form, and higher using my click button. If I could just get the
container the button is in to properly refresh after it goes offscreen,
then life would be grand.

Any ideas?

Thanks!

-LS



.



Relevant Pages

  • Re: forms containers & scroll
    ... >> are added to the container. ... >> use scrollbars and define a scrollable portion of the form, ... >> will be scrolled in the 'scrollable' portion. ... > scrollbars will move this inner container as necessary. ...
    (microsoft.public.fox.programmer.exchange)
  • Scrollbar madness
    ... if I put a container class on the form (with scrollbars ... enabled) and then put a command button in the container, ... container the button is in to properly refresh after it goes offscreen, ...
    (microsoft.public.fox.vfp.forms)
  • Re: Inheritance, vectors and copy
    ... Not okay. ... that with references. ... You'd never even be able to get them into a container ... >object in the vector and store the reference to the copy in v3. ...
    (comp.lang.cpp)
  • Re: forms containers & scroll
    ... container may grow in height depending on how many data entry controls are added to the container. ... I'd like to use scrollbars and define a scrollable portion of the form, so the form's command buttons will remain at the bottom of the form and the container will be scrolled in the 'scrollable' portion. ... Into the inner container you put all of your data entry controls. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: grid.column.container.image caused refresh problem
    ... I was using this code in other long processing code ... >> I have a grid with a column that uses a container with an image. ... >> grid;dynamicfontbold to refresh the container. ...
    (microsoft.public.fox.programmer.exchange)