OZONE Asylum
FAQ
TStringGrid + WinXP + Debug dcus + Popupmenu
This page's ID:
5720
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "TStringGrid + WinXP + Debug dcus + Popupmenu"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Well, our application used a TStringGrid to display some products... when the customer double clicked them, they were added to his shopping cart. Now, she could also right click, and there would be a menu allowing 'add to cart' as well. The Tstringgrid was set to allow only one row selected at a time, but select the whole row. All worked fine, until one day we tried the programm under XP. Problem: If you compiled without debug dcus (project/options/compiler/debug/) 'something' would be changing the selection from (example): Top = 4, Bottom = 4 to top = 0, bottom = 4. This did not happen under windows 2000, NT 4, 98, 95, or ME. Only under XP. Turning on debug dcus (to debug the problem) made it go away. Ie. there was a bug, that seemingly was fixed in the debug dcus. Now, you don't want to distribute your application with debug dcus turned on. Therefore we had to code around it... in the onPopup of our popupmenu, if stringrid.selection.top = 0 (it always set it to zero), I fetched the current mousePos via getCursorPos(), turned that to a client coordinate with stringgrid.screentoClient() and changed the selection accordingly. I probably could have also set the selection's top to it's current bottom. I also had to assign a whole TGridRect, instead of being able to set the single attributes... but that's a different story. So long, [internallink=4643]Tyberius Prime[/internallink]. Ps: Please sent me a note (or post in here) if you encounter this problem as well... nothing could be found in google at that time. [small][i](Added by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Tyberius+Prime]Tyberius Prime [/url] on Wed 11-Jun-2003)[/i][/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »