flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MichaPooh <raspar_...@yahoo.fr>
Subject Re: columnHeaderGroup.getHeaderBounds returns null
Date Fri, 04 Oct 2013 11:00:20 GMT

Yes i think it depends on the issue you mentioned.

Sure i can provide a simple scenario: (i removed the <![CDATA[ - haven't
found how to post code) 

<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
		 xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
		<!-- Place non-visual elements (e.g., services, value objects) here -->
			import mx.collections.ArrayCollection;
			import spark.components.TextInput;
			[Bindable] private var provider:ArrayCollection = new ArrayCollection([
				{a: "a1", b:"b1", c:"c1", d:"d1"},
				{a: "a2", b:"b2", c:"c2", d:"d2"},
				{a: "a3", b:"b3", c:"c3", d:"d3"}
			protected function onCreationComplete():void {
			protected function layoutTextInputs():void {
				var numCols:int = grid.columns.length;
				var w:Number = 0;
				for (var i:int=0; i<numCols; i++) {
					var header:Rectangle = grid.columnHeaderGroup.getHeaderBounds(i);
					var textInput:TextInput = new TextInput();
					textInput.left = header.x;
					textInput.width = header.width;
	<s:VGroup width="400">
		<s:HGroup width="100%" id="fieldsContainer" gap="0"/>
		<s:DataGrid id="grid" width="100%"  dataProvider="{provider}"
horizontalCenter="0" verticalCenter="0">
					<s:GridColumn dataField="a" width="50"/>
					<s:GridColumn dataField="b" width="100"/>
					<s:GridColumn dataField="c" width="150"/>
					<s:GridColumn dataField="d" width="100"/>

View this message in context: http://apache-flex-users.2333346.n4.nabble.com/columnHeaderGroup-getHeaderBounds-returns-null-tp2976p2990.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

View raw message