Solved

TypInfo for TDbRadioGroup not working?

Posted on 1998-10-13
5
248 Views
Last Modified: 2010-04-03
When the activecontrol is TDbRadioGroup propInfo returns nil in the following code. But this works for all my other DB controls. Why is this?

//  PropInfo: PPropInfo;
propInfo:= Typinfo.GetPropInfo(activeCtrl.ClassInfo, 'DataField');

Thanks, Tom.
0
Comment
Question by:tomcorcoran
  • 3
  • 2
5 Comments
 

Author Comment

by:tomcorcoran
ID: 1342748
Adjusted points to 35
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1342749
In D4, if I do this
  PropInfo:= GetPropInfo(DBRadioGroup1.ClassInfo, 'DataField');
PropInfo is not nil afterwards. Could it be that it is not the RadioGroup that is the active control, but rather the RadioButton?
0
 

Author Comment

by:tomcorcoran
ID: 1342750
Blackman,

Brillant. I now do a check as follows:

   if activeCtrl is TRadioButton then
      ctrl := activeCtrl.Parent
   else
      ctrl := activeCtrl;

GetPropInfo(activeCtr.ClassInfo ...

Please answer so I can grade. Thanks a million,

Tom.

0
 
LVL 7

Accepted Solution

by:
BlackMan earned 40 total points
ID: 1342751
In D4, if I do this
  PropInfo:= GetPropInfo(DBRadioGroup1.ClassInfo, 'DataField');
PropInfo is not nil afterwards. Could it be that it is not the RadioGroup that is the active control, but rather the RadioButton?

0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1342752
Glad I could help you...
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 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