GoFish5

32 views
Skip to first unread message

KoenP

unread,
Mar 26, 2021, 12:54:07 PM3/26/21
to GoFish

Hi,

The grid on form gofish_results.scx shows green and for some red foreground.
What is the specification for those colors?
Stay healthy,
Koen

Matt Slay

unread,
Mar 26, 2021, 1:06:33 PM3/26/21
to foxpro...@googlegroups.com

>> What is the specification for those colors?

Well, here you go:

One color represents SCX, one color represents VCX, and one color represents code files like PRG, TXT, H, INI, HTML, etc....

... BUT, there's more to it than that.

GoFish can actually call your own PRG which will allow *you* you to apply your own color formatting.

Note the code below that uses the variable lcFormatGridOrg:

    lcFormatGridPrg = 'GoFish_FormatGrid.PRG'


Also, you can also see in this code that GF will interact with Thor to use Thor Dispatcher to call "Thor_Proc_GoFish_FormatGrid.PRG"


It very unlikely that anyone knows about this feature, but it is there if you love to play with colors in a grid.


Have fun!!

See below the code from the GridFiles.Init() method in the GoFish_Results form.

- Matt Slay



Local lcFormatGridPrg, lcPRG, lcPRGColor, lcResultsCursor, lcSCX, lcSCXColor, lcVCX, lcVCXColor, lcAppPath

Thisform.oGrid = This

lcResultsCursor = Thisform.cSearchResultsAlias

lcFormatGridPrg = 'GoFish_FormatGrid.PRG'

* First choice: Thor
If Type('_Screen.cThorDispatcher') = 'C'
    lcFileName = Execscript(_Screen.cThorDispatcher, 'Full Path=Thor_Proc_GoFish_FormatGrid.PRG')
    If (Not Isnull(m.lcFileName)) and File(lcFileName)
        lcFormatGridPrg = m.lcFileName
    Endif
Endif


If !File(lcFormatGridPrg) && If not found in the VFP path
    lcFormatGridPrg = Addbs(_screen._gofish.capppath) + lcFormatGridPrg && Look for it in the GoFish folder.
EndIf

If File (lcFormatGridPrg) && Call user file to assign colors, if present, otherwise use default
      Do (lcFormatGridPrg) with This, lcResultsCursor
Else

    lcSCX = 'Upper(' + lcResultsCursor + '.filetype) = "SCX"'
    lcSCXColor = 'RGB(0,0,128)'

    lcVCX = 'Upper(' + lcResultsCursor + '.filetype) = "VCX"'
    lcVCXColor = 'RGB(0,128,0)'

    lcPRG = 'Upper(' + lcResultsCursor + '.filetype) $ "PRG TXT H INI XML HTM HTML ASP ASPX"'
    lcPRGColor = 'RGB(255,0,0)'

    This.SetAll('DynamicForeColor', 'Iif(' + lcSCX + ', ' + lcSCXColor + ', ' +  ;
            'Iif(' + lcVCX + ', ' + lcVCXColor + ', ' + ;
            'Iif(' + lcPRG + ',' + lcPRGColor + ', RGB(0,0,0))' + ;
            ')' + ;
            ')', 'COLUMN')

Endif

This.ReadOnly = .F.
This.SetAll('Width', 80, 'Column')
This.SetAll('ReadOnly', .T., 'Column')
This.colProcess.ReadOnly = .F.

This.SetAll('Movable', .t., 'Column')

--
You received this message because you are subscribed to the Google Groups "GoFish" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foxprogofish...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/foxprogofish/c1b37669-a6d7-46ad-9f44-763428223528n%40googlegroups.com.

Jim Nelson

unread,
Mar 26, 2021, 1:08:51 PM3/26/21
to foxpro...@googlegroups.com
>>> It very unlikely that anyone knows about this feature, but it is there if you love to play with colors in a grid.

Not true!  I have that PRG to provide coloring that makes more sense to me.



Matt Slay

unread,
Mar 26, 2021, 1:22:27 PM3/26/21
to foxpro...@googlegroups.com
>>> It very unlikely that anyone knows about this feature, but it is there if you love to play with colors in a grid.

>> Not true!  I have that PRG to provide coloring that makes more sense to me. 

Jim - I was referring to regular humans, not Superheros.





Matt Slay



On Mar 26, 2021, at 12:08 PM, Jim Nelson <jimrn...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages