Home Contact Site Map Privacy Policy Rev Search
Choose Font
 

News & Info
Products
Services
Developer's Corner
Sample Projects
Site Search
Sprezzatura Links
Support Section

Up
Choose Dir
Choose File
Choose Font
System Info


 

 

 ChooseFont

METHODCHOOSEFONT
DescriptionCHOOSEFONT executes a `Choose Font' dialog box. Although this dialog is basically the same as the 16-bit version, this one allows the selection of a font color as well.
  
PARAM1A field mark delimited array representing the font and color to initially select:

<1> - A valid OI font struct (@svm delimited)
<2> - The font color

See ZZ_UTILITY_DLL_EQUATES for details.

PARAM2Returns the font and color chosen by the user, using the same structure as Param1 above. If the user presses `Cancel' this parameter will return null.
PARAM3n/a
PARAM4n/a
PARAM5n/a
PARAM6n/a
  
Example:ctrlArray = @window : ".TEST_EDITBOX"
propArray = "FONT"

ctrlArray
:= @rm : @window : ".TEST_EDITBOX"
propArray := @rm : "FORECOLOR"

oldFontInfo
= get_Property( ctrlArray, propArray )
convert @rm to @fm in oldFontInfo

newFontInfo
= ""

if zz_Utility_Dll("CHOOSEFONT", oldFontInfo, newFontInfo, "", "", "", "", errorText ) then
if len( newFontInfo ) then

ctrlArray = @window : ".TEST_EDITBOX"
propArray = "FONT"
dataArray = newFontInfo<ZZ16CFT_FONTSTRUCT$>

ctrlArray
:= @rm : @window : ".TEST_EDITBOX"
propArray := @rm : "FORECOLOR"
dataArray := @rm : newFontInfo<ZZ16CFT_FONTCOLOR$>

call set_Property( ctrlArray, propArray, dataArray )

end
end else
* Handle error - see errorText var
end

[top]

 
Copyright © 2005 The Sprezzatura Group. All rights reserved.