当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Page.getViewById方法代码示例

本文整理汇总了TypeScript中tns-core-modules/ui/page.Page.getViewById方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Page.getViewById方法的具体用法?TypeScript Page.getViewById怎么用?TypeScript Page.getViewById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tns-core-modules/ui/page.Page的用法示例。


在下文中一共展示了Page.getViewById方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: exectuteOnAll

function exectuteOnAll(page: Page, callback: (txt: TextView | TextField) => void) { 
    page.getViewById("container").eachChild((child) => {
        if(child instanceof TextView || child instanceof TextField) {
            callback(child);
        }
        return true;
    })
}
开发者ID:sitefinitysteve,项目名称:NativeScript,代码行数:8,代码来源:hint-text-color.ts

示例2: createPage

export function createPage() {

    // https://github.com/NativeScript/cross-platform-modules/issues/61

    var stackPanel = new panelModule.StackLayout();
    stackPanel.id = "stackPanel";

    var btn = new button.Button();
    btn.text = "getViewById";

    var page = new pages.Page();
    page.content = stackPanel;
    page.getViewById<panelModule.StackLayout>("stackPanel").addChild(btn);

    return page;
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:16,代码来源:i61.ts

示例3: destroyViewer

 destroyViewer() {
     const pdf = this.page.getViewById('pdf');
 }
开发者ID:sean-perkins,项目名称:nativescript-pspdfkit,代码行数:3,代码来源:items.component.ts

示例4: clearForm

 clearForm(event) {
     const pdf: any = this.page.getViewById('pdf');
     pdf.setFormFields({ "Given Name Text Box": { "value": "" }, "Family Name Text Box": { "value": "" }, "House nr Text Box": { "value": "" }, "Address 2 Text Box": { "value": "" }, "Postcode Text Box": { "value": "" }, "Country Combo Box": { "value": "" }, "Height Formatted Field": { "value": "" }, "City Text Box": { "value": "" }, "Driving License CheckBox": { "value": "" }, "Favourite Colour List Box": { "value": "" }, "Language 1 Check Box": { "value": "" }, "Language 2 Check Box": { "value": "" }, "Language 3 Check Box": { "value": "" }, "Language 4 Check Box": { "value": "" }, "Language 5 Check Box": { "value": "" }, "Gender List Box": { "value": "" }, "Address 1 Text Box": { "value": "" } })
 }
开发者ID:sean-perkins,项目名称:nativescript-pspdfkit,代码行数:4,代码来源:item-detail.component.ts

示例5: fillForm

 fillForm(event) {
     const pdf: any = this.page.getViewById('pdf');
     pdf.setFormFields({ "Given Name Text Box": { "value": "Osei" }, "Family Name Text Box": { "value": "Fortune" }, "House nr Text Box": { "value": "3" }, "Address 2 Text Box": { "value": "" }, "Postcode Text Box": { "value": "000000" }, "Country Combo Box": { "value": "Trinidad & Tobago" }, "Height Formatted Field": { "value": "180" }, "City Text Box": { "value": "Siparia" }, "Driving License CheckBox": { "value": "Yes" }, "Favourite Colour List Box": { "value": "White" }, "Language 1 Check Box": { "value": "Yes" }, "Language 2 Check Box": { "value": "Yes" }, "Language 3 Check Box": { "value": "Yes" }, "Language 4 Check Box": { "value": "Yes" }, "Language 5 Check Box": { "value": "Yes" }, "Gender List Box": { "value": "Woman" }, "Address 1 Text Box": { "value": "Happy Hill Quinam Road" } });
 }
开发者ID:sean-perkins,项目名称:nativescript-pspdfkit,代码行数:4,代码来源:item-detail.component.ts

示例6: getName

 getName(event) {
     const pdf: any = this.page.getViewById('pdf');
     dialogs.alert(pdf.getFormField('Given Name Text Box'));
 }
开发者ID:sean-perkins,项目名称:nativescript-pspdfkit,代码行数:4,代码来源:item-detail.component.ts


注:本文中的tns-core-modules/ui/page.Page.getViewById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。