Subject | IB_RadioGroup, Dynamic Creation, Data Aware problem |
---|---|
Author | Christopher Hart |
Post date | 2004-07-22T14:31:24Z |
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
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