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!

Controls not visible

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
I am trying to create a form that will scroll horizontally.

The form scrolls but textbox controls on the right edge of the form do not show up when the form is initialized.

They are there, because if i drag the mouse over them they show up; (without the border).

I can't figure out what i'm missing.

Thank you,
Sam
 
Sam,

When you say the controls are "on the right edge of the form", could you be more precise. Do you mean that they are in the region to the right of the current viewport? That is, in the region that is not visible until you scroll the form to the right? Or what?

Also, what happens if you remove the scroll bars? Does that change the behaviour you are seeing? You need to check that, because it will tell you if the problem is caused by the form being scrollable or for some other reason.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I don't know what you're doing, but start out with a simple example form:
Create an SCX form, put two textboxes on its canvas, resize the form so the right textbox is right of the right border, not visible.
Set the form's ScrollBars property to 3 (both).

The form will show the horizontal scrollbar even in design mode already, the scrollbars appear automatically if you have controls below the bottom border a vertical scrollbar would also appear.

So this is all pretty automatic, nothing to do.

The only issue I know about controls becoming visible when you mouseover them is about @GET, legacy code, not real controls.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Hi Mike,

They are NOT in the viewport. When I scroll, they are still not visible unless I drag the mouse over them.

I turned off the scrollbars and the controls are not visible, but they do show up if I drag and widen the screen on to an adjacent monitor.

I turned the scrollbars back to "BOTH" and it works fine, one time only; the first time I run the program. After that it goes back to my original problem.

Sam
 
Olaf,

I had done it the way you suggested.

I just realized, there is something i should mention.
The form is resized when initialized, using code form the book "1001 Things You Wanted to Know About Visual FoxPro"

Sam
 
Thanks Mike,

I dropped the resizing for the controls. Only using it on the actual FORM.

I can make the controls larger now as the scrolling is working, so all is good.

Sam

 
Makes sense, if a form is scrollable, to which size should it be resized?

To its original size? Nothing to do for that case.
To screen size? That's the normal reason for resizing, but then no scrolling is necessary.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top