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!

How high is a PageFrame?

Status
Not open for further replies.

alvechurchdata

Programmer
Nov 8, 2003
1,737
GB
I have a form with a PageFrame. Page 1 shows customer details and I add an extra page at runtime for each of the customer's maintenance contracts. The caption of each contracts page gives the make and serial number of the machine under contract.

This works very well. Users can see at a glance all the contracts for a customer and can flip to the page with details of any particular contract.

We now have a customers with 20, 30 and 40 contracts. The pageframe grows extra rows of tabs to accomodate these contracts. First it grows large enough to cover the buttons at the base of the form. Then it grows bigger than the form.

How can I deal with this?

The Height property of the pageframe doesn't change as it grows.

I know the height the tabs but I cannot count the number of extra rows of tabs.I know the number of pages but the tabs are not a fixed width - there are between 3 and ten tabs per row.

I have added a vertical scroll bar to the form but it doesn't appear until I tab to a control that's off screen.

This problem has spoilt my afternoon and I'd be grateful of any suggestions.

Geoff Franklin
 

Geoff,

This probably doesn't answer your question, but you can use TabStretch to force the tabs to stay in a single row. And you can use TabStyle to make them fill the width of the page frame. But both options look ugly when you've got lots of tabs.

Maybe you need to look for a different (third-party) page frame control, like the one Borland uses, with wee arrows at left and right of the tabs for scrolling horizontally.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 

Geoff,

Or ... how about hiding the tabs (setting the Tabs property to .F.) and using a set of graphical option buttons instead.

You might even be able to put the option group in a container, and add your own horizontal scroll arrows, one at each end. Write code in the Click events of the scroll buttons to change the Left properties of each of the buttons. Sounds like a relaxing project for an otherwise empty evening.

I'm sorry to hear it spoilt your afternoon. Maybe you should have gone for a walk along the canal instead. That's what I would've done.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
This probably doesn't answer your question, but you can use TabStretch to force the tabs to stay in a single row

Been there - there's too much text in the tabs to fit on a single line.

I've tried tabs-on-the-left. They look really good but they make the form grow sideways.

The current bodge is to increase the form height so as there's room for the 40-contract customer plus a bit spare. Not a permanent solution but I've shipped it off to them tonight and solved the immediate crisis.

I think that the proper solution is a toss-up between Dave's TreeView idea and your no-tabs-at-all. Though I say so myself the design is a good one and should be easy to adapt. Each new page holds a container object which holds three grids and knows how to populate them from three cursors when it's created and how to destroy all three cursors when it's destroyed.

Maybe you should have gone for a walk along the canal instead.

To the pub:
Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top