some questions about browse

Post Reply
User avatar
plantenkennis
Posts: 151
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands
Contact:

some questions about browse

Post by plantenkennis »

Hello,

I am able to build a program with a browse, but i have a few questions.

1. Is it possible to change the fontcolor for specific rows. When a plantID is ending on 0 fontcolor black and if plantID is ending on 1 fontcolor grey. PlantID is a field in the table

2. When the browse is active I can scroll using keys, but if I try to scroll with my mouse the app crashes with the following message:
Unrecoverable error 9015: Symbol item expected from hb_vmDo()
Called from DBSKIP(0)
Called from TWBROWSE:GETVALUE(276) in source/classes/browse.prg
Called from TWINDOW:HANDLEEVENT(592) in source/classes/window.prg
Called from _FMH(676) in source/classes/window.prg
Called from TWINDOW:FINDCONTROL(434) in source/classes/window.prg
Called from TWINDOW:HANDLEEVENT(514) in source/classes/window.prg
Called from _FMH(676) in source/classes/window.prg
Called from WNDRUN(0)
Called from TWINDOW:ACTIVATE(266) in source/classes/window.prg

3. Is it possible to change the app icon. Now it is allways the FiveMac eye, but I want to use my own icon.

Rene
Kind regards,

René Koot
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: some questions bout browse

Post by Antonio Linares »

Rene,

1. Currently we are able to set alternate colors for the browse rows. In samples/fileman.prg there is an example:

Code: Select all

   oBrwLeft:SetColorsForAlternate( nRGB( 0xAA, 0xFF, 0xFF ), nRGB( 0x66, 0xAA, 0xFF ) )   
   oBrwLeft:SetAlternateColor( .T. )
We are looking for a way to change the color of the text of some rows

2. I just tested samples/fileman.prg and the mouse wheel is working fine on the browses. If the scrollbar is not shown
then it does not work. Could you please test fileman.prg there and let me know if it works fine for you ?

3. In samples/build.sh we set here the icon to use:

echo ' <key>CFBundleIconFile</key>' >> $1.app/Contents/Info.plist
echo ' <string>fivetech.icns</string>' >> $1.app/Contents/Info.plist

You can specify there a different icns file for your app
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
plantenkennis
Posts: 151
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands
Contact:

Re: some questions bout browse

Post by plantenkennis »

Hello Antonio,

Thanks for your reply. I have studied fileman and fivedbu for help. With the commands given, I can only change the colors line by line. So one line is lightblue the next is darkerblue. Can I manage which lines are colored?.
I have tested fileman and browse and there I can scroll using the mouse. The error given doesn't give any clou to look for?
René
Kind regards,

René Koot
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: some questions bout browse

Post by Antonio Linares »

Rene,

Please email me your PRG so I can test it, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: some questions about browse

Post by Antonio Linares »

Already implemented:

Image

I am emailing you the new libraries. This is an example of how to use it:

Code: Select all

oBrw:bClrText = { | pColumn, nRowIndex | ColorFromNRGB( If( nRowIndex % 2 == 0, CLR_RED, CLR_GREEN ) ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
plantenkennis
Posts: 151
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands
Contact:

Re: some questions about browse

Post by plantenkennis »

Hello Antonio,

THANK YOU for the very quick implementation. I will test this tomorrow and sent you my source for the scroll problem. I will make a few smal tables for testing

René
Kind regards,

René Koot
User avatar
plantenkennis
Posts: 151
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands
Contact:

Re: some questions about browse

Post by plantenkennis »

Hello Antonio,

Thanks for the new libs. I have tested it and te font coloring works great.
I was not able to change the icon of the program. I use make to build my app, so does changing the build.sh file work in this case.

And how can I include all icons in my app, the same as a .rc file in Windows?
Kind regards,

René Koot
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: some questions about browse

Post by Antonio Linares »

An OSX app is in fact a zip file renamed as app, so in OSX finder right click on your app and select "show contents" and inside
the app is where you have to use a folder named Resources and there you have to store your icns and other resources.

Also there is a Info.plist that you can edit using TextEdit and set the right values for your app.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply