StringTrimming 列挙体とは? わかりやすく解説

StringTrimming 列挙体

レイアウト形状に完全には収まらない文字列から文字トリムする場合方法指定します

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Dim instance As StringTrimming
public enum StringTrimming
public enum class StringTrimming
public enum StringTrimming
public enum StringTrimming
メンバメンバ
使用例使用例

Trimming プロパティ設定方法StringTrimming 列挙体の使用方法次の例に示します。この例は、Windows フォームでの使用意図してデザインされています。このコードフォーム貼り付けフォームPaint イベント処理するときに PaintEventArgs の e を渡して ShowStringTrimming メソッド呼び出します。

Private Sub ShowStringTrimming(ByVal
 e As PaintEventArgs)

    Dim format1 As New StringFormat
    Dim quote As String
 = "Not everything that can be counted counts," &
 _
        " and not everything that counts can be counted."
    format1.Trimming = StringTrimming.EllipsisWord
    e.Graphics.DrawString(quote, Me.Font, Brushes.Black, _
        New RectangleF(10.0F, 10.0F, 90.0F, 50.0F), format1)
End Sub
private void ShowStringTrimming(PaintEventArgs
 e)
{

    StringFormat format1 = new StringFormat();
    string quote = "Not everything that can be counted counts,"
 +
        " and not everything that counts can be counted.";
    format1.Trimming = StringTrimming.EllipsisWord;
    e.Graphics.DrawString(quote, this.Font, Brushes.Black, 
        new RectangleF(10.0F, 10.0F, 90.0F, 50.0F), format1);
}
private:
   void ShowStringTrimming( PaintEventArgs^ e )
   {
      StringFormat^ format1 = gcnew StringFormat;
      String^ quote = "Not everything that can be counted counts,"
      " and not everything that counts can be counted.";
      format1->Trimming = StringTrimming::EllipsisWord;
      e->Graphics->DrawString( quote, this->Font, Brushes::Black,
 RectangleF(10.0F,10.0F,90.0F,50.0F), format1 );
   }
private void ShowStringTrimming(PaintEventArgs
 e)
{
    StringFormat format1 = new StringFormat();
    String quote = "Not everything that can be counted counts," 
                    + " and not everything that counts can be counted.";

    format1.set_Trimming(StringTrimming.EllipsisWord);
    e.get_Graphics().DrawString(quote, this.get_Font(), 
        Brushes.get_Black(), new RectangleF(10, 10, 90, 50), format1);
} //ShowStringTrimming
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「StringTrimming 列挙体」の関連用語

StringTrimming 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



StringTrimming 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS