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!

Popup simulating multiple columns

Status
Not open for further replies.

ChrisMc

Programmer
Apr 24, 2002
43
GB
I'm trying to present users with a list from which multiple choices can be made. The POPUP... MULTISELECT command is ideal apart from the fact that I can't find a way to change the POPUP font to a mono-spaced one. As the prompt line will have text, date & numeric data [cString + DTOC(dDate) + STR(nVal,5,2)] it looks terrible in a proportional font - the columns snake all over the place.

Before I give up on this approach, does anybody have a solution?

Thanks in advance
Chris
 
The popup takes on the font of the window it is placed in. So you can either change the font of the active window temporarily, or define another window the size of your popup and put the popup in there.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Thanks for the interest Dave.

Yes, I thought that was the case but it proves not to be so:

Code:
DEFINE WINDOW PopTest ;
		AT 5,5 SIZE 20,50 ;
		FONT 'Courier', 10 ;

ACTIVATE WINDOW PopTest
@ 1,1 SAY 'This is some text that should be in Courier 10'

DEFINE POPUP test;
		FROM 3,0 ;
		IN WINDOW PopTest ;
		MARGIN ;
		MULTISELECT

USE {A TABLE}
FOR n = 1 TO 6
	DEFINE BAR n OF test PROMPT {A CHARACTER FIELD}
	SKIP
ENDFOR

ACTIVATE POPUP test

DEACTIVATE POPUP test
RELEASE POPUP test

DEACTIVATE WINDOW PopTest
RELEASE WINDOW PopTest

This gives a Courier 10 line at the top but the popup is still in what looks like Arial 10 Bold. I've also tried changing the main screen font, again with no effect.

Best regards
Chris
 
Try adding the chunk of code in blue:

DEFINE WINDOW PopTest ;
AT 5,5 SIZE 20,50 ;
FONT 'Courier', 10 ;

ACTIVATE WINDOW PopTest
@ 1,1 SAY 'This is some text that should be in Courier 10'

MODIFY WINDOW PopTest;
FONT 'Foxfont', 10

DEFINE POPUP test;
FROM 3,0 ;
IN WINDOW PopTest ;
MARGIN ;
MULTISELECT

USE {A TABLE}
FOR n = 1 TO 6
DEFINE BAR n OF test PROMPT {A CHARACTER FIELD}
SKIP
ENDFOR

ACTIVATE POPUP test

DEACTIVATE POPUP test
RELEASE POPUP test

DEACTIVATE WINDOW PopTest
RELEASE WINDOW PopTest


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Dave - how interesting! If I use Foxfont in the original code it works and takes on that character.

Ok, it solves my problem and many thanks. I wonder, however, why it *doesn't* work with other monospaced fonts. I'll have to make sure I distribute Foxfont with the app. Presumably I'll find references in the documentation which will solve that problem<g>

Again, many thanks
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top