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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing an item not currently visible on screen

Status
Not open for further replies.

scomfort

Programmer
Dec 3, 2003
44
GB
Hello,

How do you go about viewing an item that is not currently visible on the screen? The item is simply at the top of the form but is not in view when the user presses the commit button (if the item is left blank when the user presses commit it should navigate to the item with it in view). Using go_item navigates the cursor to the item fine but not the view as this has to be done manually by scrolling up. I've tried using set_view_property but cannot get it to scroll automatically up - perhaps I'm not doing this properly? Any suggestions?

Thanks.
 
Use SYNCHRONIZE after your go_item call. Forms should automatically scroll the view to keep the text cursor visible.
 
Hi there,

I tried using synchronize but the view stayed exactly the same even though the cursor had navigated to the item fine; even tried simulating it with a simple push button with just go_item and synchronize but that didnt work. Would there be another way of doing this?

Thanks.
 
What version of forms are you running? I tired the push button experiment on forms 6i (remembering to turn off 'mouse navigate' on the button properties) running on the client side.

If all else fails, try using the set_view_property(VIEWPORT...) built-ins.
 
Im using Oracle Forms 9iAS. I also created an empty test form but it didnt scroll automatically using synchronize. When I used set_view_property it does scroll fine but uses the x and y co-ordinates of the button instead of the top left corner of the canvas (its a shame using negative figures didnt make it go back up!). I've looked at all the help on views and viewports although its rather confusing. How do you set it so it takes the y co-ord as the top left of the canvas?
 
Well for some reason using synchronize works now - I didnt modify it at all - just restarted Forms!
In any case thanks for the help lewisp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top