There is no doubleClick event in Flex components, but it's quite simple to
implement this. If you look at the flexcoders archive, there has been
discussion on the same.
I could find this thread regarding Double-Click:
http://www.mail-archive.com/[email protected]/msg01391.html
You can find more at:
http://www.mail-archive.com/flexcoders%40yahoogroups.com/
-abdul
- Show quoted text -
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, April 20, 2005 12:36 PM
To: Flex Coders
Subject: [flexcoders] DataGrid doublelclick
Hi,
i'm not find documentation about "double click cell press" event into
DataGrid?
It's possibile please.
Thank you in advance.
Devis
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
ReplyForward
Invite Abdul to Gmail
| More options | Apr 20 | |||
ok thank
devis
Abdul Qabiz ha scritto:
- Show quoted text -
>Devis,
>
>There is no doubleClick event in Flex components, but it's quite simple to
>implement this. If you look at the flexcoders archive, there has been
>discussion on the same.
>
>I could find this thread regarding Double-Click:
>
> http://www.mail-archive.com/[email protected]/msg01391.html
>
>
>You can find more at:
>
> http://www.mail-archive.com/flexcoders%40yahoogroups.com/
>
>
>-abdul
>
>-----Original Message-----
>From: [email protected] [mailto:[email protected]]
>Sent: Wednesday, April 20, 2005 12:36 PM
>To: Flex Coders
>Subject: [flexcoders] DataGrid doublelclick
>
>
>Hi,
>i'm not find documentation about "double click cell press" event into
>DataGrid?
>It's possibile please.
>Thank you in advance.
>Devis
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
| More options | Apr 20 | |||
Here is an example of a DoubleClickTree should be pretty easy to
convert over to a DataGrid:
[Event("doubleClick")]
class com.mason.core.components
.DoubleClickTree extends
mx.controls.Tree {
var lastClick = 0;
var dbLastSelected:Object;
var dClick = false;
// Required for Delegate.
import mx.utils.Delegate;
function DoubleClickTree() {
addEventListener("change",_doubleClick);
}
function _doubleClick( event ) {
checkDblClick( this.selectedNode );
if( this.getIsBranch( this.selectedNode ) && dClick ) {
this.setIsOpen( this.selectedNode, (( this.getIsOpen(
this.selectedNode ) ) ? false : true), true, true);
}
if( !this.getIsBranch( this.selectedNode ) && dClick ) {
dispatchEvent({ type: "doubleClick" });
}
}
private function checkDblClick(s) {
var clickTime = getTimer();
dClick = ((clickTime-lastClick<300) && (dbLastSelected == s));
lastClick = clickTime;
dbLastSelected = s;
}
}
mx.controls.Tree {
var lastClick = 0;
var dbLastSelected:Object;
var dClick = false;
// Required for Delegate.
import mx.utils.Delegate;
function DoubleClickTree() {
addEventListener("change",_doubleClick);
}
function _doubleClick( event ) {
checkDblClick( this.selectedNode );
if( this.getIsBranch( this.selectedNode ) && dClick ) {
this.setIsOpen( this.selectedNode, (( this.getIsOpen(
this.selectedNode ) ) ? false : true), true, true);
}
if( !this.getIsBranch( this.selectedNode ) && dClick ) {
dispatchEvent({ type: "doubleClick" });
}
}
private function checkDblClick(s) {
var clickTime = getTimer();
dClick = ((clickTime-lastClick<300) && (dbLastSelected == s));
lastClick = clickTime;
dbLastSelected = s;
}
}
On 5/23/05, dillo_mac <[EMAIL PROTECTED]> wrote:
Hello folks, I'm looking to implement a double click method on a
datagrid. I have searched high and low on the web and seem to have run
into a dead end. Is this even possible to implement with flex? Any
help would be greatly appreciated.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

