Subject RE: [IBO] IB_RadioGroup, Dynamic Creation, Data Aware problem
Author Christopher Hart
As I continue testing, the item that is causing the most challenges, is
if an item is Undefined (Null or not one of the "Values") it always
wants to default to the first selection. If un-selected, and you tab
through the control, it needs to stay unselected. Is there some magic
value that Index needs to be set to if there is no values match?

-----Original Message-----
From: Christopher Hart [mailto:cjh@...]
Sent: Thursday, July 22, 2004 8:31 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] IB_RadioGroup, Dynamic Creation, Data Aware problem


I have an application in which a questionnaire is built on the fly. The
radio groups are instantiated, and placed on a scroll box. That part
seems to be working OK.

It does connect to the Data Set and write data to the selected element
when a choice is made. The problem is that it is currently not data
aware, and does not pick up the data element and map it back to the
appropriate question. When I just place it on a FORM and not create it,
it works as expected. It appears I am missing some needed setup
property.


RadioGroups[RadioGroup_cnt]:=TIB_RadioGroup.Create(self);
RadioGroups[RadioGroup_cnt].Parent:=Panels[PANEL_CNT-1]; //
Question lives within a Panel
RadioGroups[RadioGroup_cnt].Left:=5;
RadioGroups[RadioGroup_cnt].Top:=(5 + (3*16));
RadioGroups[RadioGroup_cnt].Height:=RBHeights[COUNT_CHOICES];
RadioGroups[RadioGroup_cnt].Width:=ScrollBoxQuestions.Width-35;
ParseChoice; // Builds
string lists of Questions and Values
RadioGroups[RadioGroup_Cnt].Items:=SL1;
RadioGroups[RadioGroup_cnt].Values:=SL2;
RadioGroups[RadioGroup_CNT].DataSource:=FindComponent(DataNameToUse)
as TIB_DataSource; // Associates data source with component.
RadioGroups[RadioGroup_CNT].DataField:=Data_Element;
RadioGroups[RadioGroup_CNT].OnEnter:=EditEnter; // Links to
an Event handler
RadioGroups[RadioGroup_CNT].OnExit:=EditExit;
RadioGroups[RadioGroup_cnt].ParentColor:=true;
RadioGroups[RadioGroup_cnt].Show;
RadioGroups[RadioGroup_cnt].Refresh;

All seems to work except to map a data value back to a question.

TIA

CJ Hart


============================================
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If the reader of this message is not the intended recipient
you are hereby notified that you have received this message in error and
that any review, dissemination, distribution or copying of this message
including any attachments is strictly prohibited. If you received this
in error, please contact the sender and delete the material from any
computer.

Christopher Hart
Profile Technology Group, LLC




------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/PhFolB/TM
--------------------------------------------------------------------~->

________________________________________________________________________
___
IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
without the need for BDE, ODBC or any other layer.
________________________________________________________________________
___
http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
keyword-searchable FAQ, community code contributions and more !

Yahoo! Groups Links