CHeighlund
Programmer
I'm having a problem in a program I've written. I have a TStringGrid component that actually executes the major internal database loop, and a set of four database-loaded dropdown boxes that are used to specify information coming from the database.
For some reason, clicking outside of the TStringGrid component in question seems to be shifting the 'visible' item in the dropdown boxes. That is, if you needed to break the current run, or do one run with one set of data, and then try another with only one item different, all four dropdown boxes would revert to showing their top item, no matter which item was originally selected. Since I'm matching the text of the boxes against my DB search, this presents some problems.
I have a few places in my code where the dropdown boxes are cleared and reloaded, but I've had code checkpoints on them in the compiler, and the only one that's triggering is the one that loads the boxes in the first place; even it only does so that one time. There doesn't seem to be any reason for the items to shift when they do, at least as far as I can tell. To make matters worse, it doesn't always happen. The only thing that is consistent is that it occurs when I've shifted the focus off of the TStringGrid component, never under any other conditions.
Anyone have any clue why this might be happening, and what I'll need to do to prevent it?
For some reason, clicking outside of the TStringGrid component in question seems to be shifting the 'visible' item in the dropdown boxes. That is, if you needed to break the current run, or do one run with one set of data, and then try another with only one item different, all four dropdown boxes would revert to showing their top item, no matter which item was originally selected. Since I'm matching the text of the boxes against my DB search, this presents some problems.
I have a few places in my code where the dropdown boxes are cleared and reloaded, but I've had code checkpoints on them in the compiler, and the only one that's triggering is the one that loads the boxes in the first place; even it only does so that one time. There doesn't seem to be any reason for the items to shift when they do, at least as far as I can tell. To make matters worse, it doesn't always happen. The only thing that is consistent is that it occurs when I've shifted the focus off of the TStringGrid component, never under any other conditions.
Anyone have any clue why this might be happening, and what I'll need to do to prevent it?