팩토리 » Api
xplusshowfontdialog
Description
폰트대화상자를 표시하고 대화상자에서 설정된 폰트 정보를 font class형태로 반환 받는 API이다.
파라미터 설정을 통해서 초기기동시 표시할 폰트 정보를 지정할 수 있다.
Parameters
Parameters |
Type |
Description |
strFontName |
STRING |
[옵션] 폰트 이름 (기본값: '맑은 고딕') |
nFontSize |
short |
[옵션] 폰트 사이즈 (기본값: 9) |
bFontBold |
BOOL |
[옵션] 굵게(bold)효과 적용 여부 또는 폰트 굵기(font-weight) 값(100 ~ 900) (기본값: false) |
bFontItalic |
BOOL |
[옵션] 이탤릭체(Italic:기울어진체)효과 적용 여부 (기본값: false) |
bFontUnderline |
BOOL |
[옵션] 밑줄(underline)효과 적용 여부 (기본값: false) |
bFontStrikeout |
BOOL |
[옵션] 취소선 효과 적용 여부 (기본값: false) |
clrFore |
COLOR |
[옵션] 전경색 (기본값: 0) |
Return Value
Type |
Description |
class |
font class |
Remark
font class 선언은 아래와 같습니다.
classFont = function()
{
this.szfontname = "굴림체";
this.nfontsize = 9;
this.bfontbold = false; // 또는 폰트 굵기(font-weight) 값(100 ~ 900)
this.bfontitalic = false;
this.bfontunderline = false;
this.bfontstrikeout = false;
this.forecolor = 255;
}
Example
function btnGetFont_on_mouseup(objInst)
{
var txtFont = factory.xplusshowfontdialog();
factory.consoleprint("font name : " + txtFont.szfontname);
factory.consoleprint("font size : " + txtFont.nfontsize);
factory.consoleprint("font bold : " + txtFont.bfontbold);
factory.consoleprint("font italic : " + txtFont.bfontitalic);
factory.consoleprint("font underline : " + txtFont.bfontunderline);
factory.consoleprint("font strikeout : " + txtFont.bfontstrikeout);
factory.consoleprint("font color : " + txtFont.forecolor);
}
** console에 출력 결과 **
font name : Tahoma
font size : 12
font bold : true
font italic : false
font underline : false
font stikeout : false
font color : 255
function btnGetFont2_on_mouseup(objInst)
{
// 초기 폰트 지정
factory.xplusshowfontdialog("궁서체", 13, 1, true, true, true, 255);
}
Viewer Ver.
9.1.1.1
Update Date
20230628