GrapeCity.Win.Pickers 名前空間 : FontPickerDropDownSettings クラス |
Public Class FontPickerDropDownSettings
public class FontPickerDropDownSettings
FontPickerDropDownSettingsクラスは、GcFontPickerコントロールのドロップダウンリストに関連付けられた機能を収集し、管理します。通常は、GcFontPicker.DropDownSettingsプロパティを通じてFontPickerDropDownSettingsにアクセスし、GcFontPickerコントロールのドロップダウンリストの外観や動作をカスタマイズします。
FontPickerDropDownSettingsクラスによって管理される機能は次のとおりです。
次のサンプルコードは、GcFontPicker.DropDownSettingsプロパティ上でFontPickerDropDownSettingsを使用してドロップダウンリストをカスタマイズする方法を示します。このサンプルコードを実行するには、以下のコードをSystem.Windows.Forms.Formプロジェクトに追加し、ここで作成したメソッドをコンストラクターまたはフォーム上の別のメソッドから呼び出します。
private void CreateGcFontPickerWithDropDownSettings() { // Create an instance of GcFontPicker control. GcFontPicker gcFontPicker = new GcFontPicker(); // Initialize the Name and Location of the gcFontPicker. gcFontPicker.Name = "gcFontPicker"; gcFontPicker.Location = new Point(10, 50); // Set some common properties on DropDownSettings. gcFontPicker.DropDownSettings.AutoDropDown = true; gcFontPicker.DropDownSettings.AutoWidth = true; gcFontPicker.DropDownSettings.DropDownDirection = GrapeCity.Win.Common.DropDownDirection.BelowRight; gcFontPicker.DropDownSettings.OpeningAnimation = GrapeCity.Win.Common.DropDownAnimation.Extend; gcFontPicker.DropDownSettings.ClosingAnimation = GrapeCity.Win.Common.DropDownAnimation.Extend; gcFontPicker.DropDownSettings.AllowResize = false; gcFontPicker.DropDownSettings.ShowShadow = false; // Set UseSystemVisualStyle to true, so that the drop-down list will be drawn by system // no matter what FlatStyle gcFontPicker is. gcFontPicker.DropDownSettings.UseSystemVisualStyle = true; gcFontPicker.DropDownSettings.Size = new Size(250, 300); // Initialize and set a shortcut menu for gcFontPicker's drop-down list. ContextMenuStrip myMenu = new ContextMenuStrip(); myMenu.Items.Add("menu1"); gcFontPicker.DropDownSettings.ContextMenuStrip = myMenu; // adds gcFontPicker to the form. this.Controls.Add(gcFontPicker); }
Private Sub CreateGcFontPickerWithDropDownSettings() ' Create an instance of GcFontPicker control. Dim gcFontPicker As New GcFontPicker() ' Initialize the Name and Location of the gcFontPicker. gcFontPicker.Name = "gcFontPicker" gcFontPicker.Location = New Point(10, 50) ' Set some common properties on DropDownSettings. gcFontPicker.DropDownSettings.AutoDropDown = True gcFontPicker.DropDownSettings.AutoWidth = True gcFontPicker.DropDownSettings.DropDownDirection = Common.DropDownDirection.BelowRight gcFontPicker.DropDownSettings.OpeningAnimation = Common.DropDownAnimation.Extend gcFontPicker.DropDownSettings.ClosingAnimation = Common.DropDownAnimation.Extend gcFontPicker.DropDownSettings.AllowResize = False gcFontPicker.DropDownSettings.ShowShadow = False ' Set UseSystemVisualStyle to true, so that the drop-down list will be drawn by system ' no matter what FlatStyle gcFontPicker is. gcFontPicker.DropDownSettings.UseSystemVisualStyle = True gcFontPicker.DropDownSettings.Size = New Size(250, 300) ' Initialize and set a shortcut menu for gcFontPicker's drop-down list. Dim myMenu As New ContextMenuStrip() myMenu.Items.Add("menu1") gcFontPicker.DropDownSettings.ContextMenuStrip = myMenu ' adds gcFontPicker to the form. Me.Controls.Add(gcFontPicker) End Sub
System.Object
GrapeCity.Win.Pickers.FontPickerDropDownSettings
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2