精华内容
下载资源
问答
  • widgets

    2015-02-12 16:28:52
    widgets有挂件、微件的意思,简单的说就是一个微型的控制器

    widgets

    widgets有挂件、微件的意思
    简单的说就是一个微型的控制器

    创建目录

    1、在项目目录下创建 widgets 目录
    2、下widgets目录下创建 views 目录
    创建目录

    创建widgets

    userWidget

    class userWidget extends CWidget{
        public $num = 20;
        public function init() {
        }
    
        public function run() {
            $users = $this->getUsers();
            $this->render('userwidget',array(
                'users'=>$users
            ));
        }
        protected  function getUsers()
        {
            return Yii::app()->db->createCommand()->select('id,username,ctime')->from('user')->limit($this->num)->queryAll();
        }
    }

    userWidget2

    class userWidget2 extends CWidget{
    
        public function init() {
            echo CHtml::beginForm("", "POST");
        }
        public function input($name,$value = "",$label = "")
        {
            $label = $label===""?$name:$label;
            echo CHtml::label($label.':', $name);
            echo CHtml::textField($name,$value);
        }
        public function run() {
            echo CHtml::endForm();
        }
    }

    创建widgets视图

    userwidget.php

    <table>
        <tr><th>id</th><th>username</th><th>date</th></tr>
    <?php foreach($users as $v):?>
        <tr><td><?=$v['id'];?></td><td><?=$v['username'];?></td><td><?=$v['ctime'];?></td></tr>
    <?php endforeach;?>
    </table>

    使用

    需要注意的是:
    1、widget渲染的视图,$this指向当前widget,要想使用当前controller就要 Yii::App()->controller
    2、传递的参数 可以初始化对应的 对应的公开属性
    3、widgets的第二种执行方式,beginWidget对应init(),endWidget对应run()

    <h1>调用当前controller测试</h1>
    <?php echo Yii::app()->controller->createUrl("test");?>
    
    <h1>第一种使用方式</h1>
    <?php $this->widget('application.widgets.userWidget',array('num'=>6));?>
    
    <h2>第二种使用方式</h2>
    <?php $form = $this->beginWidget('application.widgets.userWidget2');?>
    <?php $form->input('username');?>
    <?php $this->endWidget();?>
    
    展开全文
  • Widgets

    2009-11-06 10:20:00
    Widgets¶ http://docs.djangoproject.com/en/dev/ref/forms/widgets/#module-django.forms.widgets 转载于:https://www.cnblogs.com/kidstudy/archive/2009/11/06/1597220.html

    Widgets

     

    http://docs.djangoproject.com/en/dev/ref/forms/widgets/#module-django.forms.widgets

    转载于:https://www.cnblogs.com/kidstudy/archive/2009/11/06/1597220.html

    展开全文
  • <div><p>In order for this UI to grow to a full fledget application, I believe it needs to allow users to create and destroy widgets dynamically. The underlying code seems very close to be able to do ...
  • Widgets Refactor

    2020-12-27 08:22:56
    <div><p>This PR uses autoloading for all basic widgets in Page Builder. <p>There are now 2 post loop widgets. One that uses the Widgets Bundle form, and another that's essentially the same as the ...
  • Static widgets

    2020-12-03 03:59:29
    <p>Originally planned for 3.0, static widgets allow widgets to be exported using nbconvert. The mechanism of state storage has yet to be decided.</p><p>该提问来源于开源项目:jupyter-widgets/...
  • Move widgets

    2020-12-09 12:05:16
    <div><p>Move UI widgets to new location Shared scss file for widgets & overview</p><p>该提问来源于开源项目:particl/particl-desktop</p></div>
  • Widgets issue

    2021-01-08 02:37:41
    Widgets" area. <p>1/ the link to the widgets area is displayed as "http://pyrocms.dev/index.php/admin/widgets". I am assuming it might be a translation error <p>2/ when clicking into the &...
  • New widgets

    2020-12-02 20:25:15
    <div><p>Implemented new and improved widgets loosely based on the previous widget implementation. <p>The proposed widget implementation is broken up into separate components: - Base classes: - <code>...
  • Widgets docs

    2021-01-03 09:52:43
    <div><p>Guys is there any complete widgets docs for the booster? I mean, all docs(like 'labelOptions' and other properties of widgets), just dont want to seek them all in the source-code.</p>...
  • widgets page

    2021-01-10 01:56:55
    <div><p>dear devs i want to request,is it possible to add a widgets page that can replace google now from the left,,,,atleast an option to allow instead of the now page we get a page that is ...
  • Aligning widgets

    2020-12-03 00:07:32
    <p>Most widgets have a description attribute, which allows a label for the widget to be defined. The label of the widget has a fixed minimum width. The text of the label is always right aligned and ...
  • Widgets missing

    2020-12-08 22:39:15
    I sorted that, but after reinstalling the app, I could no longer see the associated widgets. I tried uninstalling and installing from Google Play, but still no widgets. Kinda confusing. Might some ...
  • <p>When setting widgets into a locked mode and adding new widgets above it the widgets are been pushed down including the locked widgets. <h2>Your environment <ul><li>1.1.0 (was 0.5.3)</li><li>Chrome...
  • Instances take the place of widgets that have already been passed to a <code>Bar</code> and configured, and hook into their <code>draw</code> operations to copy the contents of the original widget&#...
  • <ul><li>Have <code>js/googlesitekit/widgets</code> module export a <code>Widgets</code> object with some public API functions (in addition to registering the store from #1298).</li><li>The entrypoint ...
  • <div><p>The text size of widgets desktopswitch and clock doesn't follow that of the icons in lxqt panel : <p><img alt="wid" src=...
  • Flutter Widgets.pdf

    2020-07-02 17:26:04
    提供 Flutter 所有 widgets 总览,方便初学者学习,对 Flutter widgets 有一个总体的概念与分类。
  • php-widgets-源码

    2021-02-12 14:54:01
    php-widgets
  • Qt Widgets

    2017-08-27 20:32:18
    先看官方文档对Widgets的解释 Widgets are the primary elements for creating user interfaces in Qt. Widgets can display data and status information, receive user input, and provide a container for other...

    先看官方文档对Widgets的解释
    Widgets are the primary elements for creating user interfaces in Qt. Widgets can display data and status information, receive user input, and provide a container for other widgets that should be grouped together. A widget that is not embedded in a parent widget is called a window.

    也就是说Widgets就像一个大的窗口,可以在这个窗口中添加不同的小东西,我们在Qt中创建的GUI就叫Qt Widgets Application,其中又有三个基类对应着不同的窗口,这三个基类是QWidget,QMainWindow,QDialog。
    那么这三个基类创建的窗口有什么不同呢?
    其实也没什么不同。

    主要是MainWindow有自己的布局,可以添加菜单栏,工具条,状态栏什么的。
    而对话框一般作为一个辅助窗口,让用户选择然后将选择传递到主窗口,例如什么文件对话框,颜色对话框,选字体的对话框什么的。
    然后就是Widget,widget就是可以在窗口上添加不同的小部件,还可以使用不同的布局,小部件自己作为窗口又可以添加小部件.

    展开全文
  • See <a href="https://github.com/microsoft/accessibility-insights-web/files/5690314/Instructions.in.Native.widgets.and.Custom.widgets.docx">Instructions in Native widgets and Custom widgets.docx</a></p...
  • Widgets: additions

    2020-12-26 14:40:12
    <p>Widgets creations should be corrected for widgets which get stack in constructor: <code>new Widgets<...>(stackHelper.slice.mesh, controls, stack); -> <code>new Widgets<...>...
  • widgets.js

    2017-06-29 13:16:02
    http://platform.twitter.com/widgets.js
  • recent-posts</code> widgets instead of <code>largo-featured</code> widgets</li><li><code>largo-sidebar-featured</code> widgets will be replaced with <code>largo-recent-posts</code> widgets instead of ...
  • Selection widgets docstrings

    2020-12-02 09:56:19
    <div><p>This PR adds docstrings for the selection widgets. <p>Addresses issue #1552.</p><p>该提问来源于开源项目:jupyter-widgets/ipywidgets</p></div>
  • The previous v2 widgets were MUCH less obtrusive than the new V3 Select2 powered one is. <p>I was using DAL specifically because it was the only autocomplete library that didnt require select2 and ...
  • Laravel开发-widgets

    2019-08-28 17:03:17
    Laravel开发-widgets Laravel 5小部件
  • new ui widgets

    2018-02-08 13:47:27
    new ui widgets Unity UGUI Assets Store上付费UGUI工具集:https://www.assetstore.unity3d.com/cn/#!/content/27226
  • <div><p>I try to create some color in widgets and am refering to /src/lua/api_lcd.cpp for the options. I currently am facing 2 issues: - Opacity not possible? I cannot use OPACITY(5) for example as ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 30,672
精华内容 12,268
关键字:

widgets