8/27/2025 4:28:18 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
OnCustomDrawCell With Mouse Over
Posted: 06 Dec 08 6:40 AM
|
I am grouping a datagrid based upon a database field named "FamilyOrder". See below.
grdPrefund.Columns.Item(GetColumnIndexByFieldName(grdPrefund, "FAMILYORDER")).GroupIndex = 0. I also have a FormatColumnText for the header which I don't believe is relevant.
And I have colors being set in OnCustomDrawCell based upon a column named "CompletedFlag". If True, then black, else red. This works great....until I mouse over with no selection and the group header is changing colors based upon which column/row I am mousing over.
I am checking for IsFocused and IsSelected and if true exit sub.
I am also checking for database FieldName = "DocNAME" because I only want to color the document name.
Question, can we know when we are mousing over in OnCustomDrawCell versus actually drawing the cell?
Thanks in advance, Sherri
|
|
|
|
Re: OnCustomDrawCell With Mouse Over
Posted: 06 Dec 08 12:59 PM
|
I'd suggest you have a long talk w/RJSamp.. he's been thru the wringer on this particular thing (OnCustomDrawCell).
He's posted aquite a bit on this item in the Partner's NG. -- RJLedger - www.SlxWizard.com rjlSystems |
|
|
| |
|
Re: OnCustomDrawCell With Mouse Over
Posted: 07 Dec 08 5:50 PM
|
With the Group Header, the IsSelected does not do the trick. In fact, the Group Header will get colored based upon which row the mouse is over, regardless of selection. And in the code, I specify to only color if the Column.FieldName is the Document name and not the Group Header Field name.
I did find out that the Node.Parent is often NULL when mousing but not always. Thanks |
|
|
|
Re: OnCustomDrawCell With Mouse Over
Posted: 08 Dec 08 10:14 AM
|
yes, I've asked several times for a method to detect RMB vs LMB.....on a row, on a caption, on a group header, on a footer......
Group Header's actually retain all of the data for the first record in the group....so if you do an OnClick grid.GetCurrentField for a LMB or RMB on a Group it will act just like clicking on a ROW....if you are firing off deletes or views this can get quite tricky.
The Grid has redraw behaviors that fire off on pixel by pixel mouse movements (fly overs) so it knows what colors to repaint the ENTIRE grid as you wipe out pixels/ move the arrow/ mouse trails, etc. Regardless of OnDrawCell. This is THOUSANDS of calls BTW.....every pixel move call for an entire grid redraws of every cell, row, caption, header, group header, group footer, et al.....very very intensive from a graphics card and processor standpoint.
Since you have found out that we don't have control over knowing exactly where the cursor is (or what the user just did)...you have the answers to your question, unfortunately.
I don't know if a more advanced C# .NET grid control would allow you to have more control over banding, group display behavior, et al...but my guess is that it would. |
|
|
|
Re: OnCustomDrawCell With Mouse Over
Posted: 15 Dec 08 12:42 PM
|
I was able to just change back the header by simply resetting the group header to the window color...
Sender.GroupNodeTextColor = clWindowText
THis is working great for this environment. Thanks to everyone. Sherri
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|