How do I remove the space between tab button and border container.
The code is
<s:TabBar dataProvider="{vsApplication}" >
<s:layout>
<!--<s:ButtonBarHorizontalLayout gap="7" />-->
<s:HorizontalLayout gap="7" paddingBottom="0"/>
</s:layout>
</s:TabBar>
<mx:ViewStack id="vsApplication" width="100%">
<s:NavigatorContent id="ncConfiguration" label="Configuration" width="100%">
<s:BorderContainer width="100%">
</s:BorderContainer>
</s:NavigatorContent>
<s:NavigatorContent id="ncProject" label="Project" width="100%">
<s:BorderContainer width="100%">
<mx:DataGrid id="dgProject" dataProvider="{projectData开发者_运维技巧}" doubleClickEnabled="true" itemDoubleClick="dgProject_itemDoubleClickHandler(event)">
<mx:columns>
<mx:DataGridColumn headerText="Project ID" dataField="ProjectID"/>
<mx:DataGridColumn headerText="Project Name" dataField="ProjectName"/>
<mx:DataGridColumn headerText="Planned Start Date" dataField="PlannedStartDate"/>
<mx:DataGridColumn headerText="Planned End Date" dataField="PlannedEndDate"/>
<mx:DataGridColumn headerText="Actual Start Date" dataField="ActualStartDate"/>
<mx:DataGridColumn headerText="Actual End Date" dataField="ActualEndDate"/>
</mx:columns>
</mx:DataGrid>
</s:BorderContainer>
</s:NavigatorContent>
<s:NavigatorContent id="ncTimesheet" label="Timesheet" width="100%">
<s:BorderContainer width="100%">
</s:BorderContainer>
</s:NavigatorContent >
<s:NavigatorContent id="ncDashboard" label="Dashboard" width="100%">
<s:BorderContainer width="100%">
</s:BorderContainer>
</s:NavigatorContent>
</mx:ViewStack>
I had a similar problem - no padding or gap specified anywhere, but there was a space between the TabBar and the ViewStack.
The fix was to set gap="0"
in the layout of the parent component (in my case a Panel with VerticalLayout).
I fixed this by doing the same as Andy but just wrapping the components in another component
from
<s:TabBar dataProvider="{viewStack}"/>
<mx:ViewStack id="viewStack" width="100%" height="25%" creationPolicy="all">
<view:TabA id="tabA"/>
<view:TabB id="tabB"/>
</mx:ViewStack>
to
<s:VGroup gap="0" width="100%">
<s:TabBar dataProvider="{viewStack}"/>
<mx:ViewStack id="viewStack" width="100%" height="25%" creationPolicy="all">
<view:TabA id="tabA"/>
<view:TabB id="tabB"/>
</mx:ViewStack>
</s:VGroup>
In this case I wrapped my tab bar and view stack in a VGroup as I did not want to affect the gaps of any other component in my window.
精彩评论