package com.eshangrao.controls
protected var inputbox:hbox;
protected var stext:text;
protected var hoursinputfield:textinput;
protected var minutesinputfield:textinput;
protected var _hours:number = 0;
protected var _minutes:number = 30;
protected var _timedate:date;
private var _enabled:boolean=true;
override protected function createchildren():void
var widestnumber:number=61;
var linemetrics:textlinemetrics = measuretext(widestnumber.tostring());
var textwidth:number = linemetrics.width + uitextfield.text_width_padding+4;
if (!hoursinputfield)
inputfield=hoursinputfield;
if(!stext)
if (!minutesinputfield)
}override protected function measure():void
override protected function updatedisplaylist(unscaledwidth:number,unscaledheight:number):void
private function inputfield_focusinhandler(event:focusevent):void
else
focusinhandler(event);
dispatchevent(new focusevent(event.type, false, false,
event.relatedobject,
event.shiftkey, event.keycode));
}private function inputfield_focusouthandler(event:focusevent):void
private function valuecommandhandler(event:flexevent):void
else
}override protected function focusinhandler(event:focusevent):void
[bindable]
public function get hours():number
[inspectable(defaultvalue=0,category="time",name="hours")]
public function set hours(val:number):void
} dispatchevent(new event("hourschange"));
dispatchevent(new event("change"));
}[bindable]
public function get minutes():number
[inspectable(defaultvalue=30,category="time",name="minutes")]
public function set minutes(val:number):void
}dispatchevent(new event("minuteschange"));
dispatchevent(new event("change"));
}public function get time():date
public function set time(time:date):void
override public function set enabled(value:boolean):void
}
override public function get enabled():boolean
public static function formatnumberwithchar(value:number,length:int=2,pref:string="0"):string
return str;}}
}}
flex 分頁控制項
分頁顯示資料是 瀏覽中必備的元素之一,在flex中通過資料分頁的方法來獲取當前顯示資料,即能降低網路傳的負擔同時也能減少flex的處理工作。定義分頁控制項的事件 pagechangepackage public var pageindex int 0 public var pagesize int ...
Flex分頁控制項
提到分頁大家應該都很熟悉了,幾乎所有的應用中都會用到。因而完成乙個分頁元件在不同的應用中進行復用是必須的,剛寫完了乙個 flex packageutils.page 需要分頁查詢的的 sqlpublicfunctioninitsql sql string void 分頁按鈕被點選時的處理邏輯為 1....
Flex 4 0 控制項
mx.collections.ilist dataprovider length int additem item object void additemat item object,index int void removeitemat index int void setitemat index...