onfocusedcell

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

onfocusedcell

Postby tonis » Mon Mar 31, 2008 8:05 pm

How to call onfocusedcell event programmatically after clicking to a button?
tonis
Guest
 
Posts: 3
Joined: Wed Mar 26, 2008 8:13 pm
Location: Estonia

Postby AlexZencovich » Tue Apr 01, 2008 5:03 am

Sorry, I do not understand. After clicking of which button? Mouse button? It should be fired after cliocking on mouse button automatically, if that click does not fire cell editor
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby tonis » Tue Apr 01, 2008 4:34 pm

For example in main demo how to execute onfocusedcell event directly after user presses Details button? This event is first executed after user moves to another cell.
tonis
Guest
 
Posts: 3
Joined: Wed Mar 26, 2008 8:13 pm
Location: Estonia

Postby AlexZencovich » Tue Apr 01, 2008 6:16 pm

If you need to fire event after click DetailBtn just call PivotGrid1.OnFocusedCell() with corresponding parametrs.
If you want to emulate click to get all actual parameters - send MouseClick message to PivotGrid with coords from Grid.FocusedCell. You may convert col,row values to mouse coords by Grid.CellRect(col,row) function
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Postby tonis » Wed Apr 02, 2008 5:23 pm

Thanks. seems that this is working:
R := PivotGridRun.CellRect(PivotGridRun.FocusedCell.X, PivotGridRun.FocusedCell.Y);
P.X := (R.Right + R.Left) div 2;
P.Y := (R.Bottom + R.Top) div 2;
PostMessage(PivotGridRun.Handle, WM_LBUTTONDOWN, MK_LBUTTON, P.X + (P.Y shl 16));
tonis
Guest
 
Posts: 3
Joined: Wed Mar 26, 2008 8:13 pm
Location: Estonia


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron