Página 1 de 1

Pictures in Tbrowse column

Publicado: Mar Jul 17, 2007 4:31 pm
por Gejza Horvath
Hi,
I would like to show different icons in the TbrowseColumn, depending on the value in the
database, for example checked and unchecked icons. The OnDraw() event of the TbrwColumn
class seems to work only with text. Any idea how to do this trick?
Something like this pseudo code:
METHOD OnDrawBrowseColumn() CLASS TForm1
IF oDataset:ShowMe
::PaintCheckedIcon()
ELSE
::PaintUncheckedIcon()
ENDIF
RETURN Nil
Gejza Horváth

Pictures in Tbrowse column

Publicado: Mar Jul 17, 2007 5:04 pm
por notelo
Gejza,
> I would like to show different icons in the TbrowseColumn, depending on the value in the
> database, for example checked and unchecked icons. The OnDraw() event of the TbrwColumn
> class seems to work only with text. Any idea how to do this trick?
Just follow these steps:
* Select the browse object and add the images to its oImageList property,
* Click on the column then double click OnGetData event and type this code:
IF WhatEver
nImage := 1
ELSE
nImage := 2
ENDIF
And you are done.
Regards,
José Lalí­n

Pictures in Tbrowse column

Publicado: Mar Jul 17, 2007 5:04 pm
por notelo
Gejza,
> I would like to show different icons in the TbrowseColumn, depending on the value in the
> database, for example checked and unchecked icons. The OnDraw() event of the TbrwColumn
> class seems to work only with text. Any idea how to do this trick?
Just follow these steps:
* Select the browse object and add the images to its oImageList property,
* Click on the column then double click OnGetData event and type this code:
IF WhatEver
nImage := 1
ELSE
nImage := 2
ENDIF
And you are done.
Regards,
José Lalí­n

Pictures in Tbrowse column

Publicado: Jue Jul 19, 2007 7:22 am
por Gejza Horvath
Thanks,
how simply ....
I like Xailer.
Gejza Horváth
"José Lalín" <notelo@digo.com> pí¹e v diskusním pøíspìvku
news:469cdabe$[email=2@ozsrv2.ozlan.local...]2@ozsrv2.ozlan.local...[/email]
>
> Gejza,
>
>> I would like to show different icons in the TbrowseColumn, depending on the value in
>> the database, for example checked and unchecked icons. The OnDraw() event of the
>> TbrwColumn class seems to work only with text. Any idea how to do this trick?
>
> Just follow these steps:
>
> * Select the browse object and add the images to its oImageList property,
> * Click on the column then double click OnGetData event and type this code:
>
> IF WhatEver
> nImage := 1
> ELSE
> nImage := 2
> ENDIF
>
> And you are done.
>
> Regards,
> José Lalín
>

Pictures in Tbrowse column

Publicado: Jue Jul 19, 2007 7:22 am
por Gejza Horvath
Thanks,
how simply ....
I like Xailer.
Gejza Horváth
"José Lalín" <notelo@digo.com> pí¹e v diskusním pøíspìvku
news:469cdabe$[email=2@ozsrv2.ozlan.local...]2@ozsrv2.ozlan.local...[/email]
>
> Gejza,
>
>> I would like to show different icons in the TbrowseColumn, depending on the value in
>> the database, for example checked and unchecked icons. The OnDraw() event of the
>> TbrwColumn class seems to work only with text. Any idea how to do this trick?
>
> Just follow these steps:
>
> * Select the browse object and add the images to its oImageList property,
> * Click on the column then double click OnGetData event and type this code:
>
> IF WhatEver
> nImage := 1
> ELSE
> nImage := 2
> ENDIF
>
> And you are done.
>
> Regards,
> José Lalín
>