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!

ComboBox and Font List 2

Status
Not open for further replies.

Scott24x7

Programmer
Jul 12, 2001
2,826
JP
Hi All,
I've implemented a container into a ribbon bar that has RTF editing controls for fonts in it. I have a drop-down box for font name and font size, which populates from system fonts. In the INIT of the control in the container I have:
Code:
DIMENSION lcFontList[1]
*
=AFONT(lcFontList)
*
FOR lnLoopCount = 1 TO ALEN(lcFontList)
	THIS.AddItem(lcFontList[lnLoopCount])
ENDFOR
*
This.Value = lcFontList(190) && Set initial Font value to Populate Font Size List
This.DisplayValue = This.Value
*
THIS.Parent.CboRTFFontSize.FillList(THIS.Value)

But the dropdown is always blank. I can pick an item from the dropdown list, and then it is displayed, but I can't get it to set an initial value.
RowSource is set to none, and RowSourceType is set to 0 on the control. I've tried setting this to 5 - Array, and setting the RowSource to lcFontList, but that ends in an error that crashes VFP.

Any idea how to fix this?



Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Scott,
just in case you change / improve this code by eliminating the public arrays, I would like to see the newly created.
Regards,
Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top