Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, August 27, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: OnCustomDrawCell With Mouse Over
Sherri Waite
Posts: 17
 
OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
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


[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Dec 08 11:58 AM
Well it is always redrawing
With node
If isselected then

Else
''' not selected do stuff
End if
End with
[Reply][Quote]
Sherri Waite
Posts: 17
 
Re: OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Sherri Waite
Posts: 17
 
Re: OnCustomDrawCell With Mouse OverYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/27/2025 5:27:28 PM