Subject | RE: [IBO] tib_ComboBox |
---|---|
Author | Jack Cane |
Post date | 2002-08-13T17:38:38Z |
-----Original Message-----
From: Helen Borrie (TeamIBO) [mailto:helebor@...]
Sent: Tuesday, August 13, 2002 2:09 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] tib_ComboBox
At 10:33 PM 12-08-02 -0400, you wrote:
could have one or some of the following possible causes:
You are trying to use TIB_Combobox with TIBO* datasets. You can't do
that. They are not compatible. (I'm suspicious when you refer to "the
data from TableA" since it sounds as if you are using TIBOTable...)
[Jack Cane] No, I am not using any IB descendants of tTable of any kind.
You are using the datalink "topsy turvey". TIB_Combobox is not double
data-aware. The Datasource property should link to the TIB_Datasource
that
points to the parent dataset and the Datafield to the column which is to
be
linked to the combobox. You typically use a TIB_Cursor to populate the
drop-down of TIB_Combobox, and you will need to write a procedure to
achieve that. (....A linking datasource component is not required for
this
dataset since it is not linked to a control...) This is a place where a
separate transaction can be useful, so that it's possible to update the
combobox without interrupting the transaction in which the editing task is
happening.
Note that TIB_Combobox doesn't provide any live datalinking between its
underlying source of data (e.g. the IB_Cursor that you use to acquire the
items) and the linked parent. In edit mode, the value in the editbox can
be changed by scrolling and/or incremental-searching the drop-down
list. In Browse mode, the editbox of the combobox will either be static
on
the item that matches the current parent value; or "empty" if the parent
has null or a non-matchable value.
You *can* supply a "dummy" item in the TIB_Combobox's Items list. Another
trick is that you can (optionally) use the Values property of this control
to store something different to what appears in the DropDown. It's an
"all
or nothing" thing - if Values isn't nil, all of the Values items will be
sought; so you need to take care that you have the right values in each
Values item to correspond correctly with the Items member having the same
index.
[Jack Cane] I propose that I go with simplicity: use separate tComboBoxes
populated by query results, and update ib_edits from the tComboBox
selections as needed.
tks,
jwc
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com
Yahoo! Groups Sponsor
ADVERTISEMENT
___________________________________________________________________________
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 !
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
From: Helen Borrie (TeamIBO) [mailto:helebor@...]
Sent: Tuesday, August 13, 2002 2:09 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] tib_ComboBox
At 10:33 PM 12-08-02 -0400, you wrote:
>My tib_CtrlGrid, linked to TableA, has a nav bar and update bar, aread-only
>control for the key field, and tib_ComboBoxes for the other two fields.The
>idea is to offer two capabilities within the grid: select an existingrecord
>from the table, and insert a new record.the
>
>I would like to populate the items of the tib_ComboBox controls with
>permissible values that come from querying TableB and TableC.
>
>The result would be that items[ 0 ] is from the basic data and items[
>1 ]...items[ n ] come from the queries.
>
>The problem is that, after populating the items of the tib_ComboBoxes,
>basic data from TableA are no longer visible in the controls.add
>
>Perhaps this is just asking too much of the system, and perhaps I should
>those as separate, ordinary tComboBoxes.No, I think you are probably not using TIB_Combobox the proper way. It
could have one or some of the following possible causes:
You are trying to use TIB_Combobox with TIBO* datasets. You can't do
that. They are not compatible. (I'm suspicious when you refer to "the
data from TableA" since it sounds as if you are using TIBOTable...)
[Jack Cane] No, I am not using any IB descendants of tTable of any kind.
You are using the datalink "topsy turvey". TIB_Combobox is not double
data-aware. The Datasource property should link to the TIB_Datasource
that
points to the parent dataset and the Datafield to the column which is to
be
linked to the combobox. You typically use a TIB_Cursor to populate the
drop-down of TIB_Combobox, and you will need to write a procedure to
achieve that. (....A linking datasource component is not required for
this
dataset since it is not linked to a control...) This is a place where a
separate transaction can be useful, so that it's possible to update the
combobox without interrupting the transaction in which the editing task is
happening.
Note that TIB_Combobox doesn't provide any live datalinking between its
underlying source of data (e.g. the IB_Cursor that you use to acquire the
items) and the linked parent. In edit mode, the value in the editbox can
be changed by scrolling and/or incremental-searching the drop-down
list. In Browse mode, the editbox of the combobox will either be static
on
the item that matches the current parent value; or "empty" if the parent
has null or a non-matchable value.
You *can* supply a "dummy" item in the TIB_Combobox's Items list. Another
trick is that you can (optionally) use the Values property of this control
to store something different to what appears in the DropDown. It's an
"all
or nothing" thing - if Values isn't nil, all of the Values items will be
sought; so you need to take care that you have the right values in each
Values item to correspond correctly with the Items member having the same
index.
[Jack Cane] I propose that I go with simplicity: use separate tComboBoxes
populated by query results, and update ib_edits from the tComboBox
selections as needed.
tks,
jwc
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com
Yahoo! Groups Sponsor
ADVERTISEMENT
___________________________________________________________________________
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 !
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]