Here's a strange problem I can't figure out!
I have a form with a Tabcontrol on it, and the tabcontrol parents 4
different frames I've created and which are part of the project. I added
these frames to the tabsheet by dropping the TFramePicker component on it
and selecting them to be added one at a time.
In the tabcontrol's OnChange event I have a case statement which
brings to the front the frame associated with the selected tab.
On all of these frames I have Raize buttonedits that are DB-aware,
and they are hooked into the proper datasource and field of my tables. When
a tab is changed and the frame comes to the front, the table in question is
placed into edit mode so the user can information via keystrokes, drag &
drop, or via an openFileDialog that executes upon an edit's button click.
Frame number one is set to be opened and visible in the foreground
when the tabsheet's form is created and shown. It works fine. Frame number
two when moved to also works fine allowing the user to edit a table by any
of these methods. But frames three and four although allowing the user to
edit via the keyboard does not accept drag & drop nor will their edits react
to their buttons being clicked to display the open file dialog. The strange
thing is that all the code and all edit properties are exactly the same on
frames two and three, and they also share the same datasource although
hooked to different fields. I've checked everything a number of times and
the table is in edit mode, the components and table fields are all enabled,
the very same open file dialog which is parented by the form the tabsheet is
on is being used by all frames and is called in exactly the same way, and
even the individual buttons are working and enabled!
I thought at first perhaps my button click events had to be created
via the edits as they appear on each frame instance on the form, instead of
on the original frames themselves, but if that were the case then Frame two
would exhibit the same kinds of problems. I even tried setting the events
for the open file dialog and drag and drop components in code in case they
were somehow becoming disconnected at runtime, but no go! I'm completely
baffled by this one as I've used these same techniques and components in the
past without trouble. So any ideas would be appreciated!
from Robert Meek dba Tangentals Design CCopyright 2006
Proud to be a moderator of "The Delphi Lists" at elists.org
"When I examine myself and my methods of thought, I come to the conclusion
that the gift of Fantasy has meant more to me then my talent for absorbing
positive knowledge!"
Albert Einstein
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi