gpt4 book ai didi

dart - 如何使用Rikulo Anchor Layout改变TextBox View 的宽度

转载 作者:行者123 更新时间:2023-12-03 03:06:54 24 4
gpt4 key购买 nike

我是Dart和Rikulo的新手。

class NameView extends Section
{
View parentVu;

// the inputs
DropDownList titleDdl, suffixDdl;
TextBox firstNameTBox, middleNameTBox, lastNameTBox;

// the labels
TextView titleLbl, firstNameLbl, middleNameLbl, lastNameLbl, suffixLbl;

List<String> titles = [ 'Dr', 'Hon', 'Miss', 'Mr', 'Mrs', 'Prof', 'Sir' ];
List<String> suffixes = ['I', 'II', 'III', 'IV', 'Junior', 'Senior'];

NameView()
{
parentVu = new View()
..style.background = 'cyan'
..addToDocument();

titleLbl = new TextView( 'Title' );
parentVu.addChild( titleLbl );

titleDdl = new DropDownList( model : new DefaultListModel( titles ) )
..profile.anchorView = titleLbl
..profile.location = 'east center';
parentVu.addChild( titleDdl );

firstNameLbl = new TextView( 'First' )
..profile.anchorView = titleDdl
..profile.location = 'east center';
parentVu.addChild(firstNameLbl );

firstNameTBox = new TextBox( null, 'text' )
..profile.anchorView = firstNameLbl
..profile.location = 'east center';
//..profile.width = 'flex';
parentVu.addChild( firstNameTBox );
}

程序渲染。但是,它不使用浏览器的整个宽度(FireFox)。
我已经尝试过TextBoxes
profile.width ='flex'

但它不起作用。

任何帮助表示赞赏。

最佳答案

火狐浏览器?您是否使用Dartium进行了测试?请注意,必须先将其编译为JS,然后才能使用Dartium以外的浏览器进行测试。

BTW, from your implementation, NameView seems not related to parentVu at all. If it is just a controller, it needs not to extend from Section (i.e., it doesn't have to be a view).

关于dart - 如何使用Rikulo Anchor Layout改变TextBox View 的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16259212/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com