Combobox Value/Display Members

Jan Schenkel janschenkel at yahoo.com
Mon Jun 30 12:59:00 EDT 2003


--- Jez <jbradshaw at blueyonder.co.uk> wrote:
> In "most" development environments comboboxes have
> separate value and
> display elements, eg. some descriptive text is
> displayed but underneath the
> hood it has a value of some numeric ID. In rev it
> only seems to have one
> element used for both value and display, or am I
> missing something ?
> 
> Also, in a database application when I tie a
> combobox to an automatic
> recordset, nothing seems to happen, possibly due to
> the same reasons.
> 
> 

Hi Jez,

Let's say you're going for the following:
- database field value 1 <=> "Pink"
- database field value 2 <=> "Blue"
- database field value 3 <=> "Yellow"
- database field value 4 <=> "Black"

Try an option menu ; set its text to :
Pink
Blue
Yellow
Black

Now use the inspector palette to link it to a query.
When you go through the records, the option menu will
be updated with the correct label.

If you also check the "Update after editing" checkbox
in the "Database panel", then picking another item
will automatically result in an updtae in the
database.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list