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

Popups, arrays and dividers

Status
Not open for further replies.

jschenke

Programmer
Jun 19, 2001
48
BE
Hi all,

I've come to a snag that I'm not sure how to address.
On a screen I want to display a popup of about 17 lines, including dividers. This list is longer than 255 characters, and that's where the trouble starts.

So instead of defining the options directly in a PICTURE clause, I define the popup to get its content FROM an array like
LDocTypes(1)="All documents"
LDocTypes(2)="\-"
LDocTypes(3)="All invoices and credit notes - customers"
...
LDocTypes(17)="Outstanding orders - suppliers"

But then it doesn't display the divider lines correctly -- they just appear as two grey dots instead of a nice horizontal line.

Am I missing anything obvious, or do you people happen to have any ideas for a workaround?

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish at the same time." (De Rochefoucald)

PS: I could of course edit the .SPR file to split up the PICTURE clause, but that's not easy for maintenance, especially when I have to rebuild the project.
 
Why not use the DEFINE POPUP/ACTIVATE POPUP commands. This would allow you to use dividers.
Mike Wood
mikewood@mpwonline.com

 
Jan,
I'm not at my normal computer, so I can't test this at the moment, but can't you just specify the bar# from Fox? You can pick any "Seperator" bar from the normal set, such as:

DEFINE BAR _MED_BAR1 OF MyMenu PROMPT "\-"

I may not be 100% on this, but what you can do is create one of these items in your norma menu, generate the code, look at the .MPR file, and see how it specifies this. You can then figure out how to "Load" the appropriate information into your array, and still build a dynamic menu, with seperators off this. (Just a thought...)


Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Hi Mike and Scott,

I've been lookling through the FoxPro documentation for info on working with Popups that aren't ScreenGenned so to speak. Thanks for pointing it out to me.
I always thought that those DEFINEd menus were only for the menubar, but appearently not -- I guess I've been spending too much time in other development environments.

But I'm digressing ; I guess I should :
- include a bunch of DEFINEs in the screen setup code - then an ACTIVATE in the On window activate snippet
- and a DEACTIVATE in the On window deactivate snippet ?
Or am I straying in the dark here?

I just find it silly that when I use a "\-" in my PICTURE, it works fine, but not when it's FROM an array. The item is disabled, but just doesn't turn into a divider.
I tried a few variants, such as "\\-" since you need a double backslash in order to disable an individual radio button, but nothing works.

Thanks again for your help,

Jan Schenkel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top