CREATEBINARY()

SelectedBackColor, SelectedForeColor

These properties determine the colors used to highlight text.

Usage

oObject.SelectedBackColor = nBackColor nBackColor = oObject.SelectedBackColor oObject.SelectedForeColor = nForeColor nForeColor = oObjected.SelectedForeColor
Only a few controls (Edit box, Text box, Spinner, ComboBox) allow you to select text. These properties determine what colors are used for the selected text.

In a combo box, the selected colors affect only the text in the text box portion, not the drop-down list (where ItemBackColor, ItemForeColor, SelectedItemBackColor and SelectedItemForeColor hold sway). Plus, there's a very interesting effect. The current item shows up with a background of SelectedBackColor, but there's a small border around it in the combo's BackColor. (When Style = 2—drop-down list, the text in the text box portion is always selected.) You can make some pretty sharp looking effects with this (or you can set it up to be not noticeable).

Example

* Change the defaults for all objects * to black on red ThisForm.SetAll("SelectedBackColor",RGB(255,0,0)) ThisForm.SetAll("SelectedForeColor",RGB(0,0,0))

See Also

BackColor, ForeColor, ItemBackColor, ItemForeColor, SelectedItemBackColor, SelectedItemForeColor, SelLength, SelStart, SelText


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net