I have a DCBROWSE ... COLOR command that works fine. However, I would like to have a different color array combination for the record that is displayed as the current selected record.
color1, etc. is a FG/BG color array as defined in the dcbrowse help
For example
iif (condition .and. not selected record,color1, color2) otherwise iif(condition and selected record,color3,color4))
I need to know if it is possible to know for purpose of the color display, when it is on the selected line because my color1/color2 does not show up as well against the blue line selected bar.
This is a database browse.
Cliff.
DCBROWSE COLOR determine record with highlight bar
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: DCBROWSE COLOR determine record with highlight bar
Cliff -
I think you can do this, but you may have to use CURSORMODE XBPBRW_CURSOR_NONE.
Try this (I haven't tested it):
Roger
I think you can do this, but you may have to use CURSORMODE XBPBRW_CURSOR_NONE.
Try this (I haven't tested it):
Code: Select all
nRecordMarked := RecNo()
@ .. DCBROWSE .. COLOR {||IIF(nRecordMarked==RecNo(),{nil,GRA_CLR_YELLOW},{nil,nil}} ;
ITEMMARKED {||nRecordMarked := RecNo()} ;
CURSORMODE XBPBRW_CURSOR_NONE
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: DCBROWSE COLOR determine record with highlight bar
Thanks, Roger.
I used the following modification of your suggestions and it works fine. I am using CURSORMODE XBPBRW_CURSOR_ROW.
I used the following modification of your suggestions and it works fine. I am using CURSORMODE XBPBRW_CURSOR_ROW.
Code: Select all
COLOR {|| iif(!nRecordMarked==(cAlias)->(recno()) .AND. (cAlias)->lbadacct,{GRA_CLR_YELLOW,GRA_CLR_RED},{nil,nil})}
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: DCBROWSE COLOR determine record with highlight bar
I ran into problems with item selected clause screwing things up. I settled on the the following code which worked all the time. The key was the use of the {nil,nil}.
Thanks,
Cliff.
Code: Select all
COLOR {|| iif(condition{GRA_CLR_YELLOW,GRA_CLR_RED},{nil,nil})}
Cliff.