Solved

Enabling controls on a panel

Posted on 2001-08-15
17
190 Views
Last Modified: 2010-04-06
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
0
Comment
Question by:riccohb
17 Comments
 
LVL 4

Expert Comment

by:fva
ID: 6387489
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
 

Author Comment

by:riccohb
ID: 6387529
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
 
LVL 4

Expert Comment

by:fva
ID: 6387573
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:riccohb
ID: 6387585
Yes, even when the panel starts as visible, the same problem occurs.
0
 
LVL 4

Expert Comment

by:fva
ID: 6387620
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
 
LVL 4

Expert Comment

by:fva
ID: 6387626
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
 
LVL 1

Expert Comment

by:rootnash
ID: 6387636
maybe the panel is disabled.

if not, then something unusual is going on.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6388558
Hi riccohb,

looks like TEdit.ReadOnly = True;

-----
Igor
0
 
LVL 4

Expert Comment

by:fva
ID: 6388862
I tried that and the result is that you _can_ click and select, but you cannot enter/edit the text there.

F.
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6391036
ummm... check the MaxLength property?
0
 

Expert Comment

by:x4
ID: 6398366
Ponders is it actually a Tedit or a Tdbedit that is attached to no database there for you can not type in it?
0
 

Author Comment

by:riccohb
ID: 6405562
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
 

Author Comment

by:riccohb
ID: 6413370
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
 

Author Comment

by:riccohb
ID: 6413375
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
 

Expert Comment

by:S_Warrior
ID: 7124588
Check if the panel is enabled!!

if yes, then set write command edit1.focuse
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8741902
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
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8822516
PAQ'ed and points not refunded,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Yen format 3 59
Delphi...Split view - idea? 1 114
Delphi and Access based Enumeration 9 77
Sending files from  idTcpServer Socket to idTcpClient 2 52
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question