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

TitleFormat 列挙体

Calendar コントロール表示する月のタイトル書式指定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

public enum TitleFormat
public enum class TitleFormat
public enum TitleFormat
public enum TitleFormat
メンバメンバ
 メンバ説明
Monthタイトルを年でなく月を使用して表示します (たとえば、"1 月")。 
MonthYearタイトルを年と月を使用して表示します (たとえば、"2000 年 1 月")。 
解説解説
使用例使用例

予定表タイトル既定書式 (MonthYear) から Month 書式変更する方法次のコード例示します。この例を実行するには、WebForm1 という名前の Web フォーム ページ作成しPage_load メソッドをこのプログラム例置き換えます

Private Sub Page_Load(sender As
 Object, e As System.EventArgs)
   ' Change the title format of Calendar1.
   Calendar1.TitleFormat = TitleFormat.Month
End Sub 'Page_Load
private void Page_Load(object sender, System.EventArgs
 e)
{
   // Change the title format of Calendar1.
   Calendar1.TitleFormat = TitleFormat.Month;
}
private void Page_Load(Object sender, System.EventArgs
 e)
{
    // Change the title format of Calendar1.
    calendar1.set_TitleFormat(TitleFormat.Month);
} //Page_Load
<%@ Page Language="VB" AutoEventWireup="True"
 %>

<html>
   <script runat="server" >
  
      Sub Selection_Change(sender As Object,
 e As EventArgs)

         ' Set the title format.
         Calendar1.TitleFormat = CType(ModeList.SelectedIndex, TitleFormat)

      End Sub
  
   </script>
  
<body>

   <form runat="server">
  
      <h3> Calendar TitleFormat Example </h3>

      Choose the title format.

      <br><br> 
  
      <asp:Calendar id="Calendar1"
           ShowGridLines="True" 
           ShowTitle="True"
           runat="server"/>

      <br><br>

      <table cellpadding="5">

         <tr>

            <td>

               Format:

            </td>

         </tr>

         <tr>

            <td>

               <asp:DropDownList id="ModeList"
                    AutoPostBack="True"
                    OnSelectedIndexChanged="Selection_Change"
                    runat="server">

                  <asp:ListItem> Month </asp:ListItem>
                  <asp:ListItem Selected="True">
 MonthYear </asp:ListItem>

               </asp:DropDownList>

            </td>

         </tr>
  
   </form>

</body>
</html>
 
<%@ Page Language="C#" AutoEventWireup="True" %>

<html>
   <script runat="server" >
  
      void Selection_Change(Object sender, EventArgs e)
      {

         // Set the title format.
         Calendar1.TitleFormat = (TitleFormat)ModeList.SelectedIndex;

      }
  
   </script>
  
<body>

   <form runat="server">
  
      <h3> Calendar TitleFormat Example </h3>

      Choose the title format.

      <br><br> 
  
      <asp:Calendar id="Calendar1"
           ShowGridLines="True" 
           ShowTitle="True"
           runat="server"/>

      <br><br>

      <table cellpadding="5">

         <tr>

            <td>

               Format:

            </td>

         </tr>

         <tr>

            <td>

               <asp:DropDownList id="ModeList"
                    AutoPostBack="True"
                    OnSelectedIndexChanged="Selection_Change"
                    runat="server">

                  <asp:ListItem> Month </asp:ListItem>
                  <asp:ListItem Selected="True"> MonthYear </asp:ListItem>

               </asp:DropDownList>

            </td>

         </tr>
  
   </form>

</body>
</html>
 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Web.UI.WebControls 名前空間
Calendar クラス
Calendar.TitleFormat プロパティ



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS