Files
LPTCManager2026/src/view/RidersList.hx
T
nekotoro a42a468070 Trying get rid of the scroll bars
- moved view classes instanciation into CREATION_COMPLETE triggered methods
2025-11-24 18:15:47 +01:00

41 lines
1.0 KiB
Haxe

package view;
import feathers.layout.AutoSizeMode;
import feathers.controls.ListView;
import feathers.events.FeathersEvent;
import model.AppModelLocator;
import openfl.events.Event;
import t9.util.ColorTraces.*;
class RidersList extends ListView {
private var model = AppModelLocator.getInstance();
public function new() {
super();
addEventListener(FeathersEvent.CREATION_COMPLETE, onCreationComplete);
//width = 300;
//height = 400;
}
override private function initialize():Void {
super.initialize();
model.addEventListener(AppModelLocator.RIDERS_LIST_DP_CHANGE, onRideListDpChange);
}
private function onCreationComplete(event:FeathersEvent):Void {
traceBlue(this + " --> onCreationComplete() - w: " + width + " h: " + height );
}
private function onRideListDpChange(e:Event):Void {
dataProvider = model.ridersListDP;
itemToText = function(item:Dynamic):String {
return item.firstName;
};
traceGreen(this + " --> onRideListDpChange() - w: " + width + " h: " + height );
}
}