Solved

Enabling controls on a panel

Posted on 2001-08-15
17
186 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now