I have created a grid of lines and place an X in eaxh square on the click of a mouse button. However, some of the X characters disappear when other squares are clicked and I can't see why.
Well.... off the top of my head i would have printed out the square-number and the location of the textbox with the 'X' in, it seems to be a calculating problem.
If the calculating are correct it's time to test the placing of the 'X' through a for(; loop with a delay for each 'X' placed, preferbly with coordinates printed out and so forth.
This should give a clear indication of where to search for the fault.
Totte
Keep making it perfect and it will end up broken.
I tried your suggestion, but things turned out to be the same.
I see that my problem is that some of the X characters get overwritten by my TShape. If I make the TShape smaller than the grid size, then I can see some of the X (the top and bottom corners of it.
Any suggetions on how I could stop this overwriting???
Must it be the character 'X'?
Would 2 lines drawn to form a X do the trick?
A textbos requires more space around it than the textsize gives.
Looked ut TShape in the BCB6 help file:
"If the shape is only part of the image of a custom control, use the methods of the control’s canvas instead."
Could that be the answer?
I have done a program with statistic curves and some text to indicate certain levels and i use TextBox on the Canvas to write text at a "random" position, works like a charm.
I have howevere not tried to make it transparent so when i write over existing text it wipes out the portion that's in the way.
Totte
Keep making it perfect and it will end up broken.
Hey, I think that the problem could lie with the way that the shape moves around the box. If before I move it to its new position, I set the Visible parameter to false, then move the TShape, then set the TShape->Visible to true, then my problem disappears and the X character remains.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.