|
disptchEvent({type: “scroll”}),
you need the scroll in quotes. I think I would maybe try also setting the
vPosition to maxVPosition and letting it sit a frame or two then set the
vPosition back. Dispatching the event probably isn’t enough because
we need the list to bring the rows into view to get the sizing methods to kick
in. When I tried it just setting it and setting it back immediately it
wasn’t enough, you’ll need to throw a couple of doLaters in there. Matt From: Thank you for
your time Matt, I must have mistyped something when I tried, it works now. Now, if the
variableRowHeight gets right after mousewheeling or arrow clicking, what kind
of event could I fire manualy? I have tried draw, redraw, invalidate, but
no success. I used event.target.dispatchEvent({type:scroll}) but it keeps
saying 'The property scroll is an event. Use the addEventListener method
to set it.' In my souvenirs, I used dispatchEvent to force an event, what
is wrong? Philippe
Maegerman From: <mx:ComboBox
dataProvider="{sizes.size}"
creationComplete="event.target.getDropdown().cellRenderer = sizeRenderer;
event.target.getDropdown().variableRowHeight=true" /> That worked for me. However I did
see the problems with the scrollbar and it looks like a bug in the list related
to variableRowHeight. Not sure that I really have a workaround for you
right now. Sorry! Matt From: I managed to
have the cellRenderer work with a List control, but can't find a way
to have it working with a Combobox. I have
tried creationComplete = combo.getDropdown().cellRenderer = sizeRenderer on the
combo, tried also on the Application event, but not working. I also noticed a
weird behavior, if I click the arrows or the trackBar, my last item
(72) is not shown, but it does if I use keyboard up & down key or my
mouse wheel ... maybe that will not happen if I have it in a Combobox. Any help would
be apreciated. Here's my code: ==================================================================== <?xml
version="1.0" encoding="utf-8"?> =================================================================== cellRenderer:
sizeRenderer.mxml <?xml
version="1.0" encoding="utf-8"?> ==================================================================== Regards, Philippe
Maegerman From: I googled some
time but didn't find something close, usualy tons of AS code for datagrid. Hopefuly there
is a very simple example in the Flex book page 580
'CreditCardStatusCellRenderer', it is the mxml aproach that I was looking for. Cheers, Philippe
Maegerman From: You will need to implement the normal
methods of the cellRenderer (setValue) and then should use setStyle to set the
font size of your label. I would basically make your cellRenderer a Label
and just call setStyle within your setValue method. Matt From: Hi, ------------------------------------------------------------------ This
e-mail and any attached files are confidential and intended solely for the use
of the individual to whom it is addressed. If you have received this email in
error please send it back to the person that sent it to you. Any views or
opinions presented are solely those of author and do not necessarily represent
those the Emakina Company. Unauthorized publication, use, dissemination,
forwarding, printing or copying of this email and its associated attachments is
strictly prohibited. We
also inform you that we have checked that this message does not contain any
virus but we decline any responsability in case of any damage caused by an a
non detected virus.
|

