General Programming Help
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Remember me

Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Add This Thread To:   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
Unread Dev Articles Community Forums Sponsor:
Old March 6th, 2010, 04:46 PM
com64 com64 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
Join Date: Mar 2010
Posts: 1 com64 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 30 sec
Reputation Power: 0
Delphi TDrawGrid

Hey all!

I have an array of 8x8 and a TDrawGrid of 8x8 - each element of the array contains a color code and on keypress (arrow key expected) it changes the color codes in the array and redraws the changed cells in order to 'move' a blue square around the grid of black squares.

My problem is with the default behaviour of the TDrawGrid - it puts a 1px dash-border around what it considers the 'current' cell, and for some reason forces this cell to be white, along with the previous 'current' cell... this produces a 2-cell white 'snake' that moves around the grid...

I made 4 small screenshots showing the problem, but I'm too new to post images

Any help to figure this out will be *VERY* much appreciated!

Edit: I should probably mention I'm trying to get RID of this 'snake' altogether.. I've tried things like .Enabled := False (which has the lovely effect of disabling the DrawGrid lol) and .Options.goRangeSelect := False (stops the user click-dragging a range of cells, but leaves the snake there)

Edit2: It's funny how you can spend 3 days trying to figure something out, then as soon as you post on a forum you work it out yourself...

I missed an 'Update;' at the beginning of my procedure that actually draws the images onto the TDrawGrid. Put it in, and away she goes!

Thanks anyway - hopefully this can help somebody else in the future!

Reply With Quote

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Delphi TDrawGrid

Developer Shed Advertisers and Affiliates

Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap