Function Reference

_GUICtrlIpAddress_SetFont

コントロールのフォントを設定します。

#Include <GuiIPAddress.au3>
_GUICtrlIpAddress_SetFont($hWnd[, $sFaceName = "Arial"[, $iFontSize = 12[, $iFontWeight = 400[, $fFontItalic = False]]]])

 

パラメータ

$hWnd コントロールのハンドル
$sFaceName [オプション]使用するフォントのフォント名
$iFontSize [オプション]フォントサイズ
$iFontWeight [オプション]フォントウェイト
$fFontItalic [オプション]イタリック体を使用

 

返し値

なし。

 

注意

なし。

 

関連

 


#include <GuiConstantsEx.au3>
#include <GuiIPAddress.au3>

Opt("MustDeclareVars", 1)

$Debug_IP = False ; IPAddress関数に渡されるClassNameを調べる。Trueを設定すると動作確認のために他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $hgui, $hIPAddress, $hIPAddress2
   
    $hgui = GUICreate("IP address control Set Font Example", 300, 150)
    $hIPAddress = _GUICtrlIpAddress_Create ($hgui, 10, 10, 150, 30)
    $hIPAddress2 = _GUICtrlIpAddress_Create ($hgui, 10, 50, 150, 30)
    GUISetState(@SW_SHOW)

    _GUICtrlIpAddress_Set ($hIPAddress, "24.168.2.128")
    _GUICtrlIpAddress_SetFont ($hIPAddress, "Times New Roman", 14, 800, True)
    _GUICtrlIpAddress_Set ($hIPAddress2, "24.168.2.128")
    _GUICtrlIpAddress_SetFont ($hIPAddress2, "Arial", 10, 300)
   
    ; ユーザーがGUIを閉じるまで待機
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main