Enabling controls on a panel

Clicking a button on a form makes a panel visible which has three edit boxes and two buttons on it. However, when the panel becomes visible it's impossible to put text into the edit boxes. You don't get a cursor when you click on any of the edit boxes. The buttons both work OK. The edit boxes are all enabled.

Any ideas?

Cheers
riccohbAsked:
Who is Participating?
 
PashaModConnect With a Mentor Commented:
PAQ'ed and points not refunded,

PashaMod
Community Support Moderator @Experts Exchange
0
 
fvaCommented:
Is it possible you did some special message handling at the form level or that the panel is a non-standard one?

Can you tab to the edit boxes?

F.
0
 
riccohbAuthor Commented:
There's no special message handling on the form (I wouldn't know how). The panel is just standard.

I can't tab to the edit boxes or click on them to select them, although the mouse cursor changes to an I-bar when hovering over the edit boxes.

The panel is created at the same time as the form but remains invisible. When the relevant button is clicked it calls a procedure which just consists of

pnlBNName.Visible := True;
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
fvaCommented:
If you leave the panel visible at startup (i.e. no need to click that button to show the panel) does the problem still appear?

F.
0
 
riccohbAuthor Commented:
Yes, even when the panel starts as visible, the same problem occurs.
0
 
fvaCommented:
Maybe you have some weird corruption in the form's DFM or something. I presume the problem does not reproduce when creating a brand new plain form with a new plain panel and some new plain edit boxes. Therefore I would suggest to completely drop that panel (since it appears it's simple enough) and to recreate it again. It might save you a lot of trouble finding why is it behaving so oddly.

F.
0
 
fvaCommented:
P.S. If re-creating does not help, or if even further, another brand new set behaves the same way, then you probably have a corrupted VCL or something and reinstalling will creep in with its ugly face :)

F.
0
 
rootnashCommented:
maybe the panel is disabled.

if not, then something unusual is going on.
0
 
ITugayCommented:
Hi riccohb,

looks like TEdit.ReadOnly = True;

-----
Igor
0
 
fvaCommented:
I tried that and the result is that you _can_ click and select, but you cannot enter/edit the text there.

F.
0
 
DragonSlayerCommented:
ummm... check the MaxLength property?
0
 
x4Commented:
Ponders is it actually a Tedit or a Tdbedit that is attached to no database there for you can not type in it?
0
 
riccohbAuthor Commented:
Thanks for everyone's help - but nothing seems to work. The MaxLength property is OK, it isn't a Tdbedit box, and the ReadOnly property isn't set to true.

I've discovered that the problem only occurs in that one project. If I start a new project and copy all code and settings from the previous one, it works. So I think I'll just copy the whole thing into a new project and put this down to experience.
0
 
riccohbAuthor Commented:
I've solved it - all it needed was SetFocus setting to the edit box when the form was created.

Thanks to everyone for their help.
0
 
riccohbAuthor Commented:
I've solved it - all it needed was SetFocus setting to the edit box when the form was created.

Thanks to everyone for their help.
0
 
S_WarriorCommented:
Check if the panel is enabled!!

if yes, then set write command edit1.focuse
0
 
Russell LibbySoftware Engineer, Advisory Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.