Alternative to SmartFolder?

Dawn M

Member
I'm looking for an alternative paging mechanism to SmartFolders for ADM2, version 9.1C. I don't want to use buttons or radiosets. I'm looking for a "SmartPager" that can be used and reused.

Any guidance/code ideas would be greatly appreciated!
 
Hi,
I've used the MS tabstrip OCX control for years to do this - I set up a frame for the data that is to be displayed for each tab selection, and then display or hide the frames based upon the tab that is selected. You s/b able to find it in comctl32.ocx if you are using Windows...

--Mike
 
You can use any mechanism that you like to select folder pages, but I presume from your e-mail that you are looking for ideas for an alternative because tab-folders are looking a bit "dated"?

Incidentally, as you are using Windows XP, are you aware that you can enable the Windows XP GUI Look & Feel in Progress from 9.1D07 onwards? To do this you install a "manifest" XML file in the progress bin directory, set a registry entry and start Progress. Then all button, radio-sets, check-boxes etc. will automatically appear in the Windows XP GUI style. Here's the link that explains it: http://www.progresstalk.com/showthread.php?t=68712

As an alternative to a tab-folder, what about using an explorer style interface? This would consist of a series of hyperlinks down the left hand side of the window. The first link at the top would select page 1, the second page 2 etc. See the attached screen shot for an example.

This would work perfectly well but you do say that you would want this to be reusable, so you would need to create a new SmartObject. If you wanted the new SmartObject to have properties settable via a property dialog it can get quite complicated but it possible to do this entirely using the 4GL. If you need any help in this area, drop me a line.

Another alternative is to use an Outlook style list bar. This is the selection object displayed usually on the left in the Outlook window. Each icon can represent a page to select. SmartObject pages don't have to be consecutive. You can group objects on pages 5-6 and 9-12 and the ADM will be quite happy. All you need is a machanism to select the appropriate page at the appropriate time.
 

Attachments

  • screen.JPG
    screen.JPG
    45.4 KB · Views: 122
I was looking for something using Progress' widgets. Maybe something with a selection list. Sorry that I wasn't more specific! But I bet your solutions look pretty slick.

Mike Carroll said:
You can use any mechanism that you like to select folder pages, but I presume from your e-mail that you are looking for ideas for an alternative because tab-folders are looking a bit "dated"?

Incidentally, as you are using Windows XP, are you aware that you can enable the Windows XP GUI Look & Feel in Progress from 9.1D07 onwards? To do this you install a "manifest" XML file in the progress bin directory, set a registry entry and start Progress. Then all button, radio-sets, check-boxes etc. will automatically appear in the Windows XP GUI style. Here's the link that explains it: http://www.progresstalk.com/showthread.php?t=68712

As an alternative to a tab-folder, what about using an explorer style interface? This would consist of a series of hyperlinks down the left hand side of the window. The first link at the top would select page 1, the second page 2 etc. See the attached screen shot for an example.

This would work perfectly well but you do say that you would want this to be reusable, so you would need to create a new SmartObject. If you wanted the new SmartObject to have properties settable via a property dialog it can get quite complicated but it possible to do this entirely using the 4GL. If you need any help in this area, drop me a line.

Another alternative is to use an Outlook style list bar. This is the selection object displayed usually on the left in the Outlook window. Each icon can represent a page to select. SmartObject pages don't have to be consecutive. You can group objects on pages 5-6 and 9-12 and the ADM will be quite happy. All you need is a machanism to select the appropriate page at the appropriate time.
 
Well, they might look slick if I had written any! But it is possible to write stuff like that using just Progress widgets - and without making fancy API calls. But I won't go into that here.

Using a selection list as a page control isn't that difficult if you've ever written any reusable SmartObjects before. But to write even this properly would certainly take a few days, particularly if you want to use a property dialog (because you have to write that too!) and of course, you have to know how to define custom properties in SmartObjects. If it's something that you are going to use time and time again then its worth the effort.

But I have thrown one together (without custom properties) so that you can see what is generally required. This particular object actually pretends to be a tab-folder, but is in fact a selection list. But like the tab-folder, when you drop the object onto a window, you get the link advisor popping-up asking if you want to create page-source link.

Have a look in the definitions section and the main-block to see what's defined and you should be able to work things out. (I would explain it all here but I would be in danger of boring you into insensibility).

I've included a demo program that shows how it works. Note that when you choose an item in the list, it changes the page of the container just like the tab-folder does (the fill-in fields shows which page has been selected). But also, when the container changes page for itself (demonstrated by the button), the selection list object is notified so that it can highlight the correct list item.

HTH
 

Attachments

Thanks Mike. After a few hours of effort, I was able to create a new SmartObject "Pager" on my own.

What I did was start out with a SmartContainer, drop a SmartFrame on it, then drop a combo-box and two buttons (previous page & next page) on the SmartFrame. I then modified the object to be a "SmartPager" (a new class!). Then, using some definitions and code (initializeObject & initializeFolder) from adm2/folder.w and some code from a version 7 SmartPager that was developed prior to my arrival (including the property dialog), I was able to come up with a pretty sweet "pager".

If anybody is interested in the code, drop me a private message and I will get the code to you.

Mike Carroll said:
Well, they might look slick if I had written any! But it is possible to write stuff like that using just Progress widgets - and without making fancy API calls. But I won't go into that here.

Using a selection list as a page control isn't that difficult if you've ever written any reusable SmartObjects before. But to write even this properly would certainly take a few days, particularly if you want to use a property dialog (because you have to write that too!) and of course, you have to know how to define custom properties in SmartObjects. If it's something that you are going to use time and time again then its worth the effort.

But I have thrown one together (without custom properties) so that you can see what is generally required. This particular object actually pretends to be a tab-folder, but is in fact a selection list. But like the tab-folder, when you drop the object onto a window, you get the link advisor popping-up asking if you want to create page-source link.

Have a look in the definitions section and the main-block to see what's defined and you should be able to work things out. (I would explain it all here but I would be in danger of boring you into insensibility).

I've included a demo program that shows how it works. Note that when you choose an item in the list, it changes the page of the container just like the tab-folder does (the fill-in fields shows which page has been selected). But also, when the container changes page for itself (demonstrated by the button), the selection list object is notified so that it can highlight the correct list item.

HTH
 
Back
Top