Lchris Posted August 18, 2019 Share Posted August 18, 2019 Hello, I have just downloaded the trial and started experimenting things. The product looks impressive, but I have some newbie questions. like vcl Unistringgrid has an event : MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); where it returns X,Y coordinates of the mouse, ok.. But with the vcl I can do TCustomDrawGrid.MouseToCell(X, Y: Integer; var ACol, ARow: Longint); to retrieve the grid Col a Row from the X, Y coordinates. I did not find such a MouseToCell method for UniStringGrid ... how do I retrive the col & row inside OnMouseDown without it ? Thanks Chris PS: I have to ask this because our VCL application is very old and does not use the DB... components at all. It works well, but only relies on Tedit, Tcombobox, TlistBox, Tstringrid, poupulated manually. This is probably a "non RAD" or "anti RAD" configuration you never encountered, and because you probably focused on DB... components I have to make sure it will work for us. have a good day Link to comment Share on other sites More sharing options...
Sherzod Posted August 19, 2019 Share Posted August 19, 2019 13 hours ago, Lchris said: to retrieve the grid Col a Row from the X, Y coordinates. Hello, Thank you for your interest in UniGUI. Can you use OnSelectCell event instead? Link to comment Share on other sites More sharing options...
Lchris Posted August 19, 2019 Author Share Posted August 19, 2019 Hi Sherzod, I will test more this evening, after my daily taks. I understand using the correct event that returns the Col/Row in first place is more efficient than asking the client for the Col/Row and waiting the answer. Even in windows VCL Onmouseevent + mousetocell is inefficient, but allows compatibility of the OnmouseDown event across differend kind of inherited components. But wth OnMouseDown you can filter the mouse Button and test the Shift state. OnCellSelect does not have this information. So OnMouseDown is still interresting. I also noticed that events do not fire in the same order : In VCL TStringGrid events fire in this order : SelectCell, MouseDown, MouseUp In Unigui TUniStringGrid events fire in the order : MouseDown, MouseUp, SelectCell I was testing this because I hoped that perhaps unlike Windows api you allready have both informations at first call, then you could bufferize them to provide the value later without having to recall the web client (obviously at mousedown X,Y and Col,Row are linked and keep the same until mouseup). Link to comment Share on other sites More sharing options...
david_navigator Posted August 6, 2020 Share Posted August 6, 2020 @Lchris did you find a solution to this ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now