Form.ControlToPaginate プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Form.ControlToPaginate プロパティの意味・解説 

Form.ControlToPaginate プロパティ

フォーム上で改ページ位置の自動修正可能なコントロール取得または設定します既定値null 参照 (Visual Basic では Nothing) (Visual Basic では Nothing) です。

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

<BindableAttribute(False)> _
Public Property ControlToPaginate As
 Control
Dim instance As Form
Dim value As Control

value = instance.ControlToPaginate

instance.ControlToPaginate = value
[BindableAttribute(false)] 
public Control ControlToPaginate { get; set;
 }
[BindableAttribute(false)] 
public:
property Control^ ControlToPaginate {
    Control^ get ();
    void set (Control^ value);
}
/** @property */
public Control get_ControlToPaginate ()

/** @property */
public void set_ControlToPaginate (Control
 value)
public function get ControlToPaginate
 () : Control

public function set ControlToPaginate
 (value : Control)

プロパティ
フォーム上で改ページ位置の自動修正可能なコントロール

解説解説
使用例使用例

Form クラスControlToPaginate プロパティ使用して改ページ位置の自動修正を行うコントロール指定する方法コード例次に示します

この例では、フォーム2 つあるページ作成します一方フォームには非常に長い文字列があり、デバイスによっては、この文字列改ページ位置自動修正してユーザーが全テキストアクセスできるようにする必要があります改ページ位置の自動修正動作確認するには、改ページ位置の自動修正処理するデバイス上でこの例を参照する必要がありますVisual Studio 2005 では、[ツール] メニューの [デバイス エミュレータ マネージャ] で選択可能なデバイス エミュレータいずれか使用できます

メモメモ

次のコード例はシングルファイル コード モデル使用しており、分離コード ファイル直接コピーされ場合正常に動作しない可能性あります。このコード例は、拡張子.aspx の空のテキスト ファイルコピーする必要があります詳細については、「ASP.NET Web ページコード モデル」を参照してください

<%@ Page Language="VB" 
    Inherits="System.Web.UI.MobileControls.MobilePage"
 %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls"
 
    Assembly="System.Web.Mobile"
 %>
<%@ Import Namespace="System.Web.UI.MobileControls"
 %>
<%@ Import Namespace="System.Drawing"
 %>

<script runat="server">
    Private Sub Form_Activate(ByVal
 sender As Object, _
        ByVal e As EventArgs)
        
        Form1.Wrapping = Wrapping.NoWrap
        Dim a As String
 = "This is a very long string <br />"
        Dim b As String
 = "START "
        Dim i As Integer
        
        ' Create a long string to force pagination
        For i = 0 To 100
            b &= a
        Next
        
        txtView.Text = b & " END"
        Form1.ControlToPaginate = txtView
    End Sub

    Private Sub Form_Paginated(ByVal
 sender As Object, _
        ByVal e As EventArgs)
        
        ' Set the background color based on 
        ' the number of pages
        If ActiveForm.PageCount > 1 Then
            ActiveForm.BackColor = Color.LightBlue
        Else
            ActiveForm.BackColor = Color.LightGray
        End If
        
        ' Check to see if the Footer template has been chosen
        If DevSpec.HasTemplates Then
            Dim lbl As System.Web.UI.MobileControls.Label
            
            ' Get the Footer panel
            Dim pan As System.Web.UI.MobileControls.Panel
 = Form1.Footer

            ' Get the Label from the panel
            lbl = CType(pan.FindControl("lblCount"),
 System.Web.UI.MobileControls.Label)
            ' Set the text in the Label
            lbl.Text = "Page #" + Form1.CurrentPage.ToString()
        End If
    End Sub

    Private Sub Page_Load(ByVal
 sender As Object, _
        ByVal e As EventArgs)
        
        ' Set the pager text properties
        If Not IsPostBack Then
            Form1.PagerStyle.NextPageText = "Go Next >"
        Else
            ' For postback, set different text
            Form1.PagerStyle.NextPageText = "Go More >"
            Form1.PagerStyle.PreviousPageText = "< Go Prev"
        End If
    End Sub
</script>

<html  >
<body>
<!-- The first Form -->
    <mobile:Form ID="Form1" Runat="server"
 
        Paginate="true" OnActivate="Form_Activate"
 
        OnPaginated="Form_Paginated">
        <mobile:link ID="Link1" Runat="server"
 
            NavigateUrl="#Form2">
            Go To Other Form
        </mobile:link>
        <mobile:Label ID="Label1" Runat="server">
            Welcome to ASP.NET
        </mobile:Label>
        <mobile:textview ID="txtView" Runat="server"
 />
        
        <mobile:DeviceSpecific ID="DevSpec" Runat="server">
            <Choice>
                <FooterTemplate>
                    <mobile:Label runat="server"
 id="lblCount" />
                </FooterTemplate>
            </Choice>
        </mobile:DeviceSpecific>

    </mobile:Form>
    
    <!-- The second Form -->
    <mobile:Form ID="Form2" Runat="server"
 
        Paginate="true" OnPaginated="Form_Paginated">
        <mobile:Label ID="message2" Runat="server">
            Welcome to ASP.NET
        </mobile:Label>
        <mobile:link ID="Link2" Runat="server"
 
            NavigateUrl="#Form1">Back</mobile:link>
    </mobile:Form>
</body>
</html>
<%@ Page Language="C#" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>
<%@ Import Namespace="System.Web.UI.MobileControls" %>
<%@ Import Namespace="System.Drawing" %>

<script Runat="server">
    void Form_Activate(object sender, EventArgs e)
    {
        Form1.Wrapping = Wrapping.NoWrap;
        string a = "This is a very long string
 <br />";
        string b = "START ";
        
        // Create a long string to force pagination
        for (int i = 0; i < 100; i++)
            b += a;
        
        txtView.Text = b + " END";
        Form1.ControlToPaginate = txtView;
    }

    void Form_Paginated(object sender, EventArgs e)
    {
        // Set the background color based on 
        // the number of pages
        if (ActiveForm.PageCount > 1)
            ActiveForm.BackColor = Color.LightBlue;
        else
            ActiveForm.BackColor = Color.LightGray;

        // Check to see if the Footer template has been chosen
        if (DevSpec.HasTemplates)
        {   
            System.Web.UI.MobileControls.Label lbl = null;
            
            // Get the Footer panel
            System.Web.UI.MobileControls.Panel pan = Form1.Footer;

            // Get the Label from the panel
            lbl = (System.Web.UI.MobileControls.Label)pan.FindControl("lblCount");
            // Set the text in the Label
            lbl.Text = "Page #" + Form1.CurrentPage.ToString();
        }
    }

    void Page_Load(object sender, EventArgs e)
    {
        // Set the pager text properties
        if (!IsPostBack)
            Form1.PagerStyle.NextPageText = "Go Next >";
        else
        {
            // For postback, set different text
            Form1.PagerStyle.NextPageText = "Go More >";
            Form1.PagerStyle.PreviousPageText = "< Go Prev";
        }
    }
</script>

<html  >
<body>
<!-- The first Form -->
    <mobile:Form ID="Form1" Runat="server" 
        Paginate="true" OnActivate="Form_Activate"
 
        OnPaginated="Form_Paginated">
        <mobile:link ID="Link1" Runat="server" 
            NavigateUrl="#Form2">
            Go To Other Form
        </mobile:link>
        <mobile:Label ID="Label1" Runat="server">
            Welcome to ASP.NET
        </mobile:Label>
        <mobile:textview ID="txtView" Runat="server" />

        <mobile:DeviceSpecific ID="DevSpec" Runat="server">
            <Choice>
                <FooterTemplate>
                    <mobile:Label runat="server" id="lblCount"
 />
                </FooterTemplate>
            </Choice>
        </mobile:DeviceSpecific>
    </mobile:Form>
    
    <!-- The second Form -->
    <mobile:Form ID="Form2" Runat="server" 
        Paginate="true" OnPaginated="Form_Paginated">
        <mobile:Label ID="message2" Runat="server">
            Welcome to ASP.NET
        </mobile:Label>
        <mobile:link ID="Link2" Runat="server" 
            NavigateUrl="#Form1">Back</mobile:link>
    </mobile:Form>
</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からForm.ControlToPaginate プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からForm.ControlToPaginate プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からForm.ControlToPaginate プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「Form.ControlToPaginate プロパティ」の関連用語

Form.ControlToPaginate プロパティのお隣キーワード
検索ランキング

   

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



Form.ControlToPaginate プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS