Help with datagrid custom item renderer
Hi ,
I have a datagrid in which I have a column with a checkbox and a custom Checkbox header renderer and an item renderer.
When I try to disable the grid the checkbox column does not get disabled?
Is there any way I can disable the entire grid along with the checkbox column?
Thanks.
Override updateDisplayList on the renderer and set the .enabled to match
owner.enabled.
Similar Messages
-
Help with JTreeTable custom cell renderer!
Hi.
I've followed diligently the complete TreeTable2 example found on the Sun site. http://java.sun.com/products/jfc/tsc/articles/treetable2/
What I'm trying to do is to add alternate-row shading on the Column(0) of the JTreeTable where the Column class is "TreeTableModel".
so, from the example, I've added the following setCellRenderer declaration to TreeTableExample2.java:
protected JTreeTable createTreeTable() {
JTreeTable treeTable = new JTreeTable(model);
treeTable.getColumnModel().getColumn(1).setCellRenderer
(new IndicatorRenderer());
treeTable.getColumnModel().getColumn(0).setCellRenderer
(new MyTableCellRenderer());Then, I subclass DefaultTableCellRenderer as shown below, in a new class called "MyTableCellRenderer"
import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
public class MyTableCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer
private static final long serialVersionUID = 1L;
public MyTableCellRenderer() {
public Component getTableCellRendererComponent(JTable jtable, Object obj, boolean isSelected, boolean hasFocus, int i, int j)
if (i % 2 == 0 && !isSelected) {
this.setBackground(new Color(214,226,255));
this.setForeground(Color.BLACK);
} else if (isSelected)
this.setBackground(new Color(204, 204, 255));
else {
this.setBackground(Color.white);
//if (obj != null)
this.setValue(obj.toString());
System.out.println("obj: " + obj.toString());
System.out.println("obj type: " + obj.getClass().getName());
return ((Component) (this));
}I've been pulling out whatever few hairs I have left in my sparse scalp to get this working, but it's looking grim thus far.
Here are links to screenshots of my progress, or lack thereof:
Original Working TreeTable II
http://www.pharmalytix.com/original_treetable.jpg
My Not-working Tree Table II w/ Custom Cell Renderer
http://www.pharmalytix.com/customtablecellrenderer_treetable.jpg
thanks again - !!phew! finally got this sucker working. I had to retrieve the default rendererer of my TreeTable's TreeTableModel class column, which is the JTree and then, in its component-form, start mucking about with its stylings. The real black-hole of progress was caused by my brain imploding from not being able to understand that a "Component" was what represented the "thing" whose behaviour I wanted to alter, be it a Jtree node or Jtable cell.
treeTable.getColumnModel().getColumn(0).setCellRenderer(new TableCellRenderer() {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
Component comp = treeTable.getDefaultRenderer(TreeTableModel.class).getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
if (row % 2 == 0 && !isSelected) {
comp.setBackground(new Color(214,226,255));
comp.setForeground(Color.BLACK);
} else
if (isSelected)
comp.setBackground(new Color(204, 204, 255));
else {
comp.setBackground(Color.white);
return comp;
});In all of its ravishing glory:
http://www.pharmalytix.com/alternateshading_treetable.jpg
Edited by: DataHog on Nov 6, 2007 10:21 AM -
Hi again, developers:
I'm in a search of a datagrid with certain characteristics:
- variableRowHeight = "true"
- only one column
- each row must have a custom item renderer with possibly different heights, and a fixed width
- the datagrid must show always every item in the data provider with no vertical scroll bars, what means that the datagrid height must have always the exact height sum of all the item renderers it is displaying.
- and no extra empty rows must appear in the last positions of the datagrid
The last two requirements are something difficult to achieve... for some reason, empty rows appear at the last positions of the datagrid. I post what i've managed to get:
<mx:Script>
<![CDATA[
private function resize():void
if (dg.dataProvider)
var h:Number = dg.measureHeightOfItems( -1, dg.dataProvider.length);
dg.height = h;
]]>
</mx:Script>
<mx:DataGrid id="dg" width="530" horizontalCenter="0" verticalScrollPolicy="off"
dataProvider="{dp}"
wordWrap="true" variableRowHeight="true" showHeaders="false" dataChange="resize()" height="{dg.measureHeightOfItems(-1,dg.dataProvider.length)}" click="Alert.show(dg.rowCount.toString());">
<mx:columns>
<mx:DataGridColumn headerText="ID" width="50">
<mx:itemRenderer>
<mx:Component>
<mx:TextArea height="{Math.random()*100}" wordWrap="true" backgroundColor="{Math.random() * 16777216}" paddingTop="0" paddingBottom="0"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>Thanks Harui, but it doesn't help. If the border is set it will help, but the very big problem is the empty rows that appear at the end of the datagrid... I can't find a way of measuring correctly the height of the itemRenderers!
I'll update this thread if I manage to do it. -
Data provider problem in custom item renderer
I have a complex, custom item renderer for a list. I add
items that I extracted from an xml to the data provider using the
IList interface. But when displaying the list, the items are all
screwed up. Each rendered item has some parts which are initialized
as different components depending on the values from the xml. This
initialization is called in the item renderer for the
creationComplete event.
The weird thing is that when I output the dataProvider to
check its values, some of the items have internal uids sometimes
and sometimes they don't. If I output the dataProvider right after
I add the items to it, none of them get internal uids. But from the
initialize method, some of them do and some don't.
To make things weirder, sometimes, as I scroll up and down
the list, the dynamic components get all switched up. I'm either
having a problem with internal uids or with the creation policies
for lists. Or it's probably some simpler mistake I have yet to see.
Anyone have any idea where the problem could lie? Any help is
greatly appreciated.Any successful render must:
1) override the set data property of the component
Further, best practice is to store any data you need in the
override set data(), and call invalidateProperties(). Then do the
actual work in an override commitProperties() function.
The framework is smart about when to call commitProperties
efficiently. set data() gets called much more often.
Tracy -
Range component in custom item renderer
Hi,
I am trying to put a spark Range component into the labelItemRenderer for flex mobile. Everytime I add it I get the error: "Skin for (long directory name for my range component) cannot be found". The custom item renderer is an actionscipt class because I read this is the best way to make them for mobile. I'll put the error in the bottom of the post.
If anyone has any idea why this could be happening or if anyone knows a possible way around this it would be extremely helpful. I basicaly just need a list where each item has a label on side and then a progress bar on the other side.
Thanks.
Here is the full error, ill put a star on the line where the addChild method gets called in my item renderer for the range component.
Error: Skin for HoosFit0.TabbedViewNavigatorApplicationSkin5.tabbedNavigator.TabbedViewNavigatorSkin7.con tentGroup.ViewNavigator1.ViewNavigatorSkin12.contentGroup.
FCfacilities139.SkinnableContainerSkin141.contentGroup.Group143.facilityList.ListSkin145.S croller147.ScrollerSkin148.DataGroup146.FCfacilitiesInnerClass0_157.Range154 cannot be found.
at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.y\frameworks\pr ojects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.y\frame works\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.y\framework s\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
at mx.core::UIComponent/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UICo mponent.as:7176]
*** at views::itemRenderer2/set data()[/Users/evan/Documents/Adobe Flash Builder 4.6/HoosFit/src/views/itemRenderer2.as:73]
at spark.components::SkinnableDataContainer/updateRenderer()[E:\dev\4.y\frameworks\projects\ spark\src\spark\components\SkinnableDataContainer.as:606]
at spark.components.supportClasses::ListBase/updateRenderer()[E:\dev\4.y\frameworks\projects \spark\src\spark\components\supportClasses\ListBase.as:1106]
at spark.components::DataGroup/setUpItemRenderer()[E:\dev\4.y\frameworks\projects\spark\src\ spark\components\DataGroup.as:1157]
at spark.components::DataGroup/initializeTypicalItem()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\DataGroup.as:327]
at spark.components::DataGroup/ensureTypicalLayoutElement()[E:\dev\4.y\frameworks\projects\s park\src\spark\components\DataGroup.as:384]
at spark.components::DataGroup/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\comp onents\DataGroup.as:1467]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:8430]
at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx \managers\LayoutManager.as:665]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:816]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]Hi,
I am trying to put a spark Range component into the labelItemRenderer for flex mobile. Everytime I add it I get the error: "Skin for (long directory name for my range component) cannot be found". The custom item renderer is an actionscipt class because I read this is the best way to make them for mobile. I'll put the error in the bottom of the post.
If anyone has any idea why this could be happening or if anyone knows a possible way around this it would be extremely helpful. I basicaly just need a list where each item has a label on side and then a progress bar on the other side.
Thanks.
Here is the full error, ill put a star on the line where the addChild method gets called in my item renderer for the range component.
Error: Skin for HoosFit0.TabbedViewNavigatorApplicationSkin5.tabbedNavigator.TabbedViewNavigatorSkin7.con tentGroup.ViewNavigator1.ViewNavigatorSkin12.contentGroup.
FCfacilities139.SkinnableContainerSkin141.contentGroup.Group143.facilityList.ListSkin145.S croller147.ScrollerSkin148.DataGroup146.FCfacilitiesInnerClass0_157.Range154 cannot be found.
at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.y\frameworks\pr ojects\spark\src\spark\components\supportClasses\SkinnableComponent.as:698]
at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.y\frame works\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]
at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.y\framework s\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]
at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:7634]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
at mx.core::UIComponent/addChild()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UICo mponent.as:7176]
*** at views::itemRenderer2/set data()[/Users/evan/Documents/Adobe Flash Builder 4.6/HoosFit/src/views/itemRenderer2.as:73]
at spark.components::SkinnableDataContainer/updateRenderer()[E:\dev\4.y\frameworks\projects\ spark\src\spark\components\SkinnableDataContainer.as:606]
at spark.components.supportClasses::ListBase/updateRenderer()[E:\dev\4.y\frameworks\projects \spark\src\spark\components\supportClasses\ListBase.as:1106]
at spark.components::DataGroup/setUpItemRenderer()[E:\dev\4.y\frameworks\projects\spark\src\ spark\components\DataGroup.as:1157]
at spark.components::DataGroup/initializeTypicalItem()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\DataGroup.as:327]
at spark.components::DataGroup/ensureTypicalLayoutElement()[E:\dev\4.y\frameworks\projects\s park\src\spark\components\DataGroup.as:384]
at spark.components::DataGroup/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\comp onents\DataGroup.as:1467]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\ UIComponent.as:8430]
at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx \managers\LayoutManager.as:665]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:816]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180] -
DataGrid Horizontal Scroll Problem when datagrid contains Item renderer
I have datagrid with horizontal scroll policy enabled. Grid
contains some item renderer also.One of the item renderer is
datefield when i select a date from the datefield and say the
adjacent cell of the grid also contain datefield itemrenderer
and i am selecting date from that itemrenderer also.When i
scroll horizontally the date in the itemrender changes to any one
of the two itemrenderer.Some time it works fine.I am getting the
issue for combobox itemrender also.Can any one help me to solve
this issue."happybrowndog" <[email protected]> wrote in
message
news:ge11ag$jdo$[email protected]..
>
quote:
Originally posted by:
ravi_bharathii
> I have datagrid with horizontal scroll policy enabled.
Grid contains some
> item
> renderer also.One of the item renderer is datefield when
i select a date
> from
> the datefield and say the adjacent cell of the grid also
contain datefield
> itemrenderer
> and i am selecting date from that itemrenderer also.When
i scroll
> horizontally
> the date in the itemrender changes to any one of the two
itemrenderer.Some
> time
> it works fine.I am getting the issue for combobox
itemrender also.Can any
> one
> help me to solve this issue.
>
> Ravi, I am having a similar problem. I subclass a
TextInput as an
> itemrenderer for a column in a datagrid. My subclassed
TextInput checks
> to see
> the value in the overriden set() method, and depending
on the value, sets
> the
> background color of the TextInput to green. When the
datagrid scrolls
> horizontally, some unrelated cell colors also change
green and some of the
> data
> gets duplicated in the cells. The underlying data
provider's data is not
> confused however. Seems the rendering is screwed up when
the Datagrid
> scrolls.
>
> Did you find a solution to this problem? I think
Datagrid is a piece of
> screwed up code.
http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q2 -
Changing values in custom item renderer
I have an xml feed that I am using to populate a List control. The list control has it's itemRenderer property set to CustomListItem which a custom component built by me to display various pieces of data from the xml along with an icon. At certain points I would like to ba able to tell one of the fields in CustomListItem to change from displaying xml.firstData to xml.secondData depending on a radio button selection but I can't find a way to access the properties of CustomListItem from main.mxml (which is where the radio buttons are).
At the moment the values in CustomListItem are set using functions within it to parse the 'data' property.
Sorry if this is a bit of a sketchy explanation of my problem Any suggestions would be great.
CheersI hope this code represents your situation, but at least I hope it helps you!
----------------------- main app ----------------------------
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%"
height="100%" creationComplete="dataRequest.send();"
xmlns:comp="*" horizontalAlign="left">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import MyListItems;
import mx.collections.XMLListCollection;
[Bindable] private var xmllist:XMLList;
[Bindable] private var xlc:XMLListCollection;
private function resultHandler(evt:ResultEvent):void{
xmllist = evt.result.item;
xlc = new XMLListCollection(xmllist.firstData);
private function changeData(evt:Event):void{
if(evt.currentTarget.label == "First Data"){
xlc = new XMLListCollection(xmllist..firstData);
}else{
xlc = new XMLListCollection(xmllist.secondData);
]]>
</mx:Script>
<mx:HTTPService id="dataRequest" useProxy="false" url="data.xml"
resultFormat="e4x" result="resultHandler(event)"/>
<mx:RadioButtonGroup id="items"/>
<mx:RadioButton group="{items}" label="First Data" change="changeData(event)"
selected="true"/>
<mx:RadioButton group="{items}" label="Second Data" change="changeData(event)"/>
<mx:List width="100" height="150" itemRenderer="MyListItems"
dataProvider="{xlc}"/>
</mx:Application>
----------------------- item renderer --------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Text text="{data}"/>
</mx:HBox>
------------------------------- data.xml ---------------------------
<?xml version="1.0" encoding="utf-8"?>
<mydata>
<item>
<firstData>apples</firstData>
<secondData>oranges</secondData>
</item>
<item>
<firstData>beef</firstData>
<secondData>chicken</secondData>
</item>
<item>
<firstData>milk</firstData>
<secondData>juice</secondData>
</item>
<item>
<firstData>carrot</firstData>
<secondData>tomato</secondData>
</item>
</mydata> -
Report FBL1N with flag Customer items
Hello,
When I set the flag "Customer Items" in the selection screen of the report FBL1N I can display the vendor items and also the related custome items.
The problem is that I can display the list of all the vendors and below the list of the customers with the total balance.
I'd like to display the vendor items with the balance of the vendor invoices then the related customer items with the balance of the customer invoices and then the balance of the vendor and customer invoices.
Is it possible?
Please let me know.
Thanks a lot in advance
Kind Regards,
EmanuelaHello,
Thanks for your answer.
My problem is another one.
I have two vendors:
- Vendor A
- Vendor B
This to Vendors are linked to the following Customers:
- Customer A
- Customer B
If I execute the FBL1N with the falg customeer items, I can display:
1) List of Vendor A invoices and total amount
2) List of Vendor B invoices and total amount
3) List of Customer A invoices and total amount
4) List of Customer B invoice sand total amount
5) Balance of Vendor (A + B) and Customer (A+B) invoices
I'd like to find a way to modify the sequence because I need to have:
1) List of Vendor A invoices and total amount
2) List of Customer A invoices and total amount
3) Balance of Vendor A and Customer A invoices
4) List of Vendor B invoices and total amount
4) List of Customer B invoices and total amount
5) Balance of Vendor B and Customer B invoices
Only in this way I can display properly the result of compensation for each couple of Vendor/Customer.
In the standard display the result has no meaning.
Thanks a lot for your help
Cheers,
Emanuela -
How can I use the CustomEvent in custom Item Renderer
Hi all.
I have a small problem, which i must solve.
I have a ImageRenderer - TileList with a custom ItemRenderer.
When I choose a picture a button appears (in the ItemRenerer) and when I click it it throws an event with the name of the picture.
The Problem is, that i can not add an event Listener to the ItemRenderer.
Can anybody help me to resolve this problem?But how can I catch it in the top of the list??????
The ItemRenderer is a IFactory Class Object, which has only one function newInstance().
I repeat it again, there is no addEventListener or something else for the ItemRenderer.
I can give you only a header of the code because it is a big project (and if somebody have a solution or an example, maybe he could give me the it, please)
<?xml version="1.0" encoding="utf-8"?>
<mx:TileList xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();"
dataProvider="{imageList}"
labelField="label"
iconField="thumbnail"
itemRenderer="{new ClassFactory(ThumbnailRenderer)}" verticalScrollPolicy="auto">......
and the renderer
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalAlign="center" verticalAlign="middle" creationComplete="init()"
xmlns:DataModels="DataModels.*"
click="selectedHandler()" height="125">
<mx:Image source="{data.thumbnail}"
width="80"
height="50" horizontalCenter="0"
verticalCenter="0" horizontalAlign="center" verticalAlign="middle"/>
<mx:Label text="{data.label}"
horizontalCenter="0"
bottom="0" />
<mx:Metadata>
[Event(name="addImageEvent", type="DataModels.AddImageEvent")]
</mx:Metadata>
The button is created dynamicly. When i clicked it, then i dispatch a new AddImageEvent
like this
...button.addEventListener(MouseEvent.CLICK, dispatchAddImageEvent);...private function dispatchAddImageEvent(event:Event):void{ var addImageEvent:AddImageEvent = new AddImageEvent(AddImageEvent.ADD_IMAGE_EVENT); dispatchEvent(addImageEvent);}
Inside the renderer i can catch it, because there is the addEventListener method, but not in the ITEMRENDERER (IFactory element) -
Setting Focus to datagrid next Item renderer column
Hi
I am having spark datagrid with 7 colum, I am facing problem to set focus for item renderer element.
Below is my datagrid, when user enter some text in text input and press TAB key, I want trade button to be in focus. and from trade column Tab key press I want delete button to be in focus.
I tried giving
tabEnabled="true" tabChildren="false" tabFocusEnabled="true" editable="true" hasFocusableChildren="true"
for datagrid.
Also i tried giving selectedCell
var _focusedCell:Object = new Object();
_focusedCell.rowIndex = dgTermDepo.selectedIndex;
_focusedCell.columnIndex = 5;
dg.selectedCell = _focusedCell as CellPosition;
but nothing is working, I know I am missing some logic or property, Please suggest me on this
Thanks
SonuYou need to dig down into the event object and look at the
listData.
public function clickMe(e : MouseEvent ):void {
var rowIndex : int = e.currentTarget.listData.rowIndex
var colIndex : int = e.currentTarget.listData.columnIndex
if the listData object is null when you try this you may need
to add the following methods as overrides to the renderer or create
a base renderer and extend all your renderers from the base
renderer so that you always override these methods.
[Bindable("dataChange")]
private var _listData : BaseListData;
override public function get listData() : BaseListData {
return _listData;
override public function set listData( value : BaseListData )
: void {
_listData = value;
} -
Need help with a customized interactive web application for apparel
Help!!!!
Hi I am a web designer at beginners stage with web
devlopment. I am seeking guidance on how to develop a customized
interactive web application so that the end user can change color
and patterns of apparel on vector images such as teamsports
uniforms and tshirts. Once the design is customized to their liking
they can save it with all of the spec information in a file to
there desktop or to a database to send to the manufacturer.
Also looking for a possible way to use a CMS so I can upload
templates of the garment easily for the end user to customize
online. Can this be done and if so how? This is an example the kind
of application I am looking for:
http://www.dynamicteamsports.com/elite/placeorder.jsp
I am in desperate need of some brilliant developer to help
with this.
Thanks in advance for anyone who is willing to assist or give
me guidance,
Danka
"Reap what you sew"some parts of that are doable using non-advanced skills, but
will be difficult and unwieldly if there are more than a few
colors/patterns.
saving the image to the server is a bit more advanced and
you're going to need some server-side scripting like php, perl, asp
etc. in addition to some flash programming ability. -
Help with Scrolling Text Item.
Hi , need help with making a text item scrollable.
i.e. A field is 30 characters and i can only display 10
characters, now what I would like is a scroll bar under the text
item.
Is this possible. I am using Forms 5.
Thanx for any help.
Pankaj Patel.
nullPetr Valouch (guest) wrote:
: Pankaj Patel (guest) wrote:
: : Hi , need help with making a text item scrollable.
: : i.e. A field is 30 characters and i can only display 10
: : characters, now what I would like is a scroll bar under the
: text
: : item.
: : Is this possible. I am using Forms 5.
: : Thanx for any help.
: : Pankaj Patel.
: Hi
: You need that scrollbar under the item? You can set length
of
: text item and its size independently, so you can have text
item
: char(30) with size of 10 characters.
An alternative is to declare the item as a multi-line text item
with wrap set on. This would give you a vertical scroll bar on
the item.
Another option is to programmaticaly pop up an Editor, each time
focus is moved to the item, or to actually change the width of
the item when focus moves to it (and shrink it back when focus
moves away.
Simon Hedges
Gloucester
UK
null -
Datagrid Checkbox item renderer Issue.
Hi There
Recently I faced a requirement to have a checkbox inside a datagrid where I need to develop a music module with playlist management for ADOBE AIR based application.
For this I have searched and found a source to use Datagrid and Checkbox components which overrides some inbuild methods to give the required result..
But Finally I ended with one strange issue
When the check box is placed in the datagrid at 0 column index it works firne but if we place at any index ( I need it to be last colum ) the checkbox is not updating the display.
Source Flex Air project attached.
From the sample... While clicking on a row the left column checkbox is getting updated but Right remains same... when you scroll the Datagrid then the checkboxes are getting update when they are redrawn. I didn't found where to call the redraw for the right checkbox column.
Cany any one faced this strange issue. and found any solution ?????
If the Logic what I am following for a Playlist module is not good one then suggest if you guys know any other mechanism to develop a playlist management with datagrid and Checkboxes.
Message was edited by: ChintuBabuHi There
Recently I faced a requirement to have a checkbox inside a datagrid where I need to develop a music module with playlist management for ADOBE AIR based application.
For this I have searched and found a source to use Datagrid and Checkbox components which overrides some inbuild methods to give the required result..
But Finally I ended with one strange issue
When the check box is placed in the datagrid at 0 column index it works firne but if we place at any index ( I need it to be last colum ) the checkbox is not updating the display.
Source Flex Air project attached.
From the sample... While clicking on a row the left column checkbox is getting updated but Right remains same... when you scroll the Datagrid then the checkboxes are getting update when they are redrawn. I didn't found where to call the redraw for the right checkbox column.
Cany any one faced this strange issue. and found any solution ?????
If the Logic what I am following for a Playlist module is not good one then suggest if you guys know any other mechanism to develop a playlist management with datagrid and Checkboxes.
Message was edited by: ChintuBabu -
Frustrated and seeking help with a custom sort order...
I created a family photo album and arranged all of the pictures in a specific order and sync'd them with my iPad, unfortunately the pictures do not stay in the custom sequence.
I tried Batch renaming with a Custom Name and Index, but the renaming is applied to the pictures based on the date they were created and not by the way I have arranged them.
Is there a solution to my problem?
TIAI flagged fifty photos and from that selection I created an album. I went to the album and dragged the photos in to the order I wanted them to appear after selecting Manual. Each time I now choose the manual option it arranges the photos into the sequence I created.
The problem I'm having is that when I synchronize my iPad with iTunes the photos revert back to their original sort order, which is the default date they were brought in to Aperture.
As I said, I tried to give them new names and index numbers using a batch command AFTER I arranged them manually, which works, however the names are assigned to the photos sequentially starting with oldest photos and not to photos as I have arranged them.
Honestly, it would be easier for me to create a slideshow using the timeline in FCP, but a video is not what I'm after.
I hope I have answered your questions.
TIA -
Datagrid colum item renderer HELP!!!!!
Hi,
I have the below datagrid, and I have to populate one of the column with three different images, a cricle an squeare and a triangle. I've been sucessful adding dinamically the differents itemrenderers. For the triangle one it has been a really pain in the *** tying to draw the triangle, but finally i figured it out, and I can draw it, but I cant set the result triangle in the middle of the column, I dont know if it's a Sprite. But I've tried with a button and it sets in th emiddle of the column, so it has to be because the sprite or something i'm doing work in some of the classes. Please HELP!!! I really appreciate your help and advice I'm newbie at Flex.
Thanks in advance!!!
<s:HGroup y="200" left="22" right="22">
<s:Group width="100%">
<mx:DataGrid id="dgDatosMapa" width="357" height="108" visible="true" dataProvider="{arrDatos}" rowHeight="40">
<mx:columns>
<mx:DataGridColumn headerText="Símbolo" dataField="simbolo" textAlign="center" width="80" />
<mx:DataGridColumn headerText="Tamaño" dataField="size" textAlign="center" visible="false" />
<mx:DataGridColumn headerText="Intervalo" dataField="intervalo" textAlign="center" width="80"/>
<mx:DataGridColumn headerText="Rótulo" dataField="rotulo" textAlign="center" width="80"/>
</mx:columns>
</mx:DataGrid>
</s:Group>
</s:HGroup>
var col:DataGridColumn = dgDatosMapa.columns[0];
col.itemRenderer = new ClassFactory(triangle);
package widgets
import flash.accessibility.AccessibilityProperties;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Graphics;
import flash.display.LoaderInfo;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.geom.Transform;
import mx.containers.Canvas;
import mx.containers.HBox;
import mx.controls.List;
import mx.controls.listClasses.IListItemRenderer;
import mx.controls.listClasses.ListItemRenderer;
import mx.core.UIComponent;
import mx.managers.ISystemManager;
import spark.components.Group;
import spark.primitives.Graphic;
import spark.primitives.Line;
import widgets.CustomImportLayers.ImportLayers;
public class triangle extends UIComponent implements IListItemRenderer
private var _objData:Object;
private var sprite:Sprite;
public function triangle()
super();
height=20;
width=16;
override protected function createChildren():void
super.createChildren();
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth,unscaledHeight);
public function drawTriangle(datos:Object):void
_objData = datos;
sprite = new Sprite();
var triangleHeight:int = (_objData.size/4);
var uic:UIComponent = new UIComponent();
sprite.graphics.lineStyle(1,int(0x000000),1);
sprite.graphics.beginFill(_objData.simbolo);
sprite.graphics.moveTo((triangleHeight/2)+2, 3);
sprite.graphics.lineTo(triangleHeight+2, (triangleHeight+1));
sprite.graphics.lineTo(2, triangleHeight+1);
sprite.graphics.lineTo((triangleHeight/2)+2, 3);
sprite.graphics.endFill();
uic.addChild(sprite);
this.addChild(uic);
override protected function commitProperties() : void
super.commitProperties();
public function set data(value:Object):void
_objData = value;
public function get data():Object
return _objData;
package widgets
import mx.containers.HBox;
import mx.containers.VBox;
import mx.controls.Button;
import spark.components.Group;
import widgets.GenMapasTematicos.triangle;
public class tri extends HBox
private var trian:triangle;
private var _objData:Object;
public function tri()
super();
this.width=80;
this.setStyle("horizontalAlign", "center");
this.setStyle("verticalAlign", "top");
override protected function createChildren():void
var b:Group = new Group();
b.percentWidth=100;
this.addChild(b);
trian = new triangle();
b.addElement(trian);
override protected function commitProperties() : void
super.commitProperties();
trian.drawTriangle(_objData);
override public function set data(value:Object):void
_objData = value;
super.invalidateDisplayList();
override public function get data():Object
return _objData;Here is my Scenario, in my datagrid the second column of the first row (987.93) background color depends upon some condtion. The remaning rows of column B depends upon the column C . If "the column C is OK" it will be green , "NOT OK" red. But the first row's second column color depends upon some other condition. How can i achieve this ?
Maybe you are looking for
-
Garageband Loop Download Problem
I'm using GB 4.1, and when I go to select a loop, a dialog box pops up and asks if I want to install the complete set of loops at 1.2 GB, and gives me three options: Download Now, Download Later, or Install from DVD. If I select Download Now, Softwar
-
I have some pdf files that opens, prints etc. just fine. But i can't search fo word in them. It simplys doesn't find words that actually are in the document. If I copy/paste some of the text to Word (or anywhere else) it shows strange charecters: thi
-
H.264 home movie works in FireFox(kind of) not Safari
I've created a website in iWeb which includes a h.264 movie. The movie loads and runs on Firefox as a file(from the desk top) but not at my website. In Safari the movie will not open as a file or at the website. After it tries to load the movie a "?"
-
Can We sell product type Warranty in the Webshop??
Hi Gurus, Business requirement is to sell Warranty products (product type: Warranty) in web shop. ie Extended warranty product. As per my knowledge, webshop supports the sales of product type Material and Services. How can we address this?? Regards,
-
Shortcut for star rating _and_ move to next photo?
Is there a modifier key to hold down when using the number pad to rate photos that will automatically move on to the next photo? 2.0 G5, MacBook Pro 2.0 Mac OS X (10.4.8)