i_Color.ch

Source code related resources

Moderator: Rathinagiri

JALMAG
Posts: 262
Joined: Sun Jan 10, 2010 7:05 pm
DBs Used: DBF, MariaDB
Location: España - Spain

Re: i_Color.ch

Post by JALMAG »

Gracias a andyglezl, Grigory y demás por vuestras aportaciones.
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: i_Color.ch

Post by mustafa »

Hola amigos:
Experimentando con el estupendo Trabajo sobre Colores
del Maestro Grigory Filatov.
Ver --> http://www.hmgforum.com/viewtopic.php?f ... WinVersion
He intentado hacer un Buscador Rapido de Nombres de Colores,
pero desafortunadamente cuando se pulsa el Color seleccionado
no está dando la Busqueda el Código númerico Correcto.
Cuando no está en forma de Busqueda está saliendo correcto.
Las Flechas también está indicando correctamente código color y
Nombre del Color , solo está fallando los códigos con el Buscador

Si algún compañero lo puede revisar creo que sería una aportación
como Herramienta para localizar el color y con copia y pega
transferir a nuestros proyectos que estemos trabajando.

El Copia y Pega está funcionando perfecto se han incorporado
los Corchetes ---> en el codigo de Color "{000,000,000}"

Hay otro Sample del amigo Esgici que tambíen modifique
Ver-> http://www.hmgforum.com/viewtopic.php?f ... afa#p57606

*--------------------------------------------- Google ----------------------------------------------------*
Hello friends:
Experimenting with the great Work on Colors
of Master Grigory Filatov.
See -> http://www.hmgforum.com/viewtopic.php?f ... WinVersion
I tried to make a Quick Search of Names of Colors,
but unfortunately when you press the selected Color
The correct numerical code is not giving the Search.
When it is not in the form of a search it is going right.
The Arrows is also correctly indicating color code and
Name of the Color, it is only failing the codes with the Finder

If a colleague can review it, I think it would be a contribution
as a tool to locate the color and with copy and paste
transfer to our projects that we are working.

The Copy and Paste is working perfect have been incorporated
Brackets ---> in the color code "{000,000,000}"

There is another Sample of the friend Esgici that also modify
See-> http://www.hmgforum.com/viewtopic.php?f ... afa#p57606

Regards
Mustafa
Attachments
Colors_Tools.zip
(407.47 KiB) Downloaded 210 times
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: i_Color.ch

Post by serge_girard »

Thanks Mustafa!

Serge
There's nothing you can do that can't be done...
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: i_Color.ch

Post by mustafa »

Gracias amigo Serge
Pero el sample no está funcionando correctamente, en el
Buscador , no está dando los Códigos de colores
correctamente
Mustafa
*----------------------------------- Google --------------------------------*
Thanks Serge friend
But the sample is not working properly, in the
Search engine, is not giving the color codes
correctly
Mustafa
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: i_Color.ch

Post by edk »

mustafa wrote: Fri Feb 01, 2019 3:48 pm Experimenting with the great Work on Colors
of Master Grigory Filatov.
See -> http://www.hmgforum.com/viewtopic.php?f ... WinVersion
I tried to make a Quick Search of Names of Colors,
but unfortunately when you press the selected Color
The correct numerical code is not giving the Search.
When it is not in the form of a search it is going right.
The Arrows is also correctly indicating color code and
Name of the Color, it is only failing the codes with the Finder

If a colleague can review it, I think it would be a contribution
as a tool to locate the color and with copy and paste
transfer to our projects that we are working.

The Copy and Paste is working perfect have been incorporated
Brackets ---> in the color code "{000,000,000}"

There is another Sample of the friend Esgici that also modify
See-> http://www.hmgforum.com/viewtopic.php?f ... afa#p57606

Regards
Mustafa
Hi Mustafa.
When you shrink the grid to the search results, the number of items in the grid changes and the grid position number (value) no longer corresponds to the position in the aColor table.
Replace Procedure Show_RGB() with this one:

Code: Select all

*---------------------------------------------------------*
 Procedure Show_RGB()
*---------------------------------------------------------*
Local cColorName :=  Form_1.Grid_1.CellEx (Form_1.Grid_1.Value, 1)
Local nSearchATaColors := ASCAN ( aColors, { |x| x [1] == cColorName } ) 

 Form_1.StatusBar.Item( 1 ) := SPACE(3)+" Value RGB: " + IIF (nSearchATaColors > 0, aColors [ nSearchATaColors] [ 2 ], 'Unknown' ) + SPACE(2)+ "Color :"+SPACE(1)+ IIF (nSearchATaColors > 0, aColors [ nSearchATaColors] [ 1 ], 'Unknown' ) 

Return
Similarly, you must do the same with CopyClipboard(), GetColumnBackColor(), ...

Personally, I would change the search method to find the name of the color not necessarily from the beginning of the name, but also in the middle.
In the SearchChange_2() function change condition:

Code: Select all

IF Upper( cTxtQ ) = Upper( Left(aData [ i ] [ 1] , nLen ) )
to this one:

Code: Select all

IF Upper( cTxtQ ) $ Upper( aData [ i ] [ 1] )
and see the search result for ex. 'Brown'.

Regards, Edward.
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: i_Color.ch

Post by mustafa »

Hola amigo Edward "edk"
Muy amable por haberte tomado la molestia de revisar
el código fuente.

He efectuado los cambios que has indicado, no se si
los he efectuado correctamente.
Referente a: Procedure Show_RGB() ok
Verifica haber si está correcto --> CopyClipboard()
No he modificado nada en ---> GetColumnBackColor()
Parece que esta funcionando Bien con tus modificaciones
está saliendo correcto con System.Clipboard --> Copiar
y Pegar.
Saludos
Mustafa

PD: He llegado tarde a tu última modificación para
SearchChange_2()
Me percaté cuando ya está publicada la
modificación .

*----------------------------- Google ----------------------------*

Hello friend Edward "edk"
Very kind for having taken the trouble to review
the source code

I have made the changes you have indicated, I do not know if
I have done them correctly.
Concerning: Procedure Show_RGB () ok
Check if it is correct -> CopyClipboard ()
I have not modified anything in ---> GetColumnBackColor ()
It seems to be working well with your modifications
is coming out correct with System.Clipboard --> Copy and Paste

Regars
Mustafa

PD: I've been late for your last modification to
SearchChange_2 ()
I realized when the modification.
Attachments
Colors_Tools_New.zip
(407.84 KiB) Downloaded 168 times
screenshot.jpg
screenshot.jpg (54.67 KiB) Viewed 2637 times
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: i_Color.ch

Post by mustafa »

Hi Edward "edk"
with your last modification for the
Search ---> SearchChange_2()
have to change this code

Code: Select all

*---------------------------------------------------------*
 FUNCTION Cleany()
*---------------------------------------------------------*
   Form_1.Text_002.Value :=""
   Form_1.Text_002.SetFocus
   Positione() 

Return Nil

Regards
Mustafa
Attachments
Colors_Tools_New.zip
(407.87 KiB) Downloaded 182 times
Post Reply