🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #234

Re: Changing displaying value with TDBComboBox

#234
From: Giuliano
Date: Thu, 26 Jul 2007 07:55
23 lines
1678 bytes
Il Wed, 25 Jul 2007 15:04:59 -0400, Star <noemai@noemail.com> ha scritto:

>
>Hi,
>
>I am using a TDBComboBox control for displaying certain field from a 
>table in a db. The possible values 0..255
[snip]
>Is there an easy way of doing that?

Hi,         

   have a look at "calculated fields". Create one of that and set the OnGetText and
OnSetText events with appropriate code. 
Upon displaying, you have to show a modified version of the value of the real data field.
When you modify the calculated field, you have to reflect the changes onto the data field,
obviously after you have made the appropriate calculations. 
This should work fine, especially if you hide the underlying field, setting his Visible
property to false.

Regards

Giuliano
Technical Details
Message-ID: <f6iga350e5b558a04t59ikapeavdbk13fm@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46a79f0e$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,5798a535e4b2a09d
X-Google-Attributes: gid10698b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Giuliano <>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Changing displaying value with TDBComboBox
Date: Thu, 26 Jul 2007 09:55:46 +0200
Message-ID: <f6iga350e5b558a04t59ikapeavdbk13fm@4ax.com>
References: <46a79f0e$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.72.236.131
X-Trace: newsgroups.borland.com 1185436543 81.72.236.131 (26 Jul 2007 00:55:43 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1530