Screenio Listview Filterlist question

More advanced topics discussed.

Moderators: Susan Smith, admin, Gabriel

Post Reply
bluesfannoz
Posts: 274
Joined: Fri Jun 19, 2009 9:01 am
Location: Topeka, Kansas
Contact:

Screenio Listview Filterlist question

Post by bluesfannoz »

I have the following code in a Filterlist Function in my Screenio program. It changes the color of the lines in the listview that I want. All but the line that is currently selected. It does not show the text in RED. How do I get the text on the line that is currently selected to remain RED?

Code: Select all

 ! function\merq_filterlist.brs
 ! Created on 05/05/2014
 !
 ! fnmerq_filterlist - This Function ...
 !
 !
 def fnmerq_filterlist$(mat f$,mat f,ParentKey$,prefix$,mat Subscripts$,mat S$,Mat USERDATA$)
  Let N11$="PIC(--------.##)"
  Let CR=REC(DATAFILE) : Let SR=sio_fld_Check
  let fnmerq_Filterlist$="/#000000:#FFFFFF"
  IF F$(REQ_REQEBF)="1" Then let fnmerq_Filterlist$="/#F02207:#FFFFFF"
  LET AMT=VAL(F$(REQ_REQTAM))
  LET F$(REQ_REQTAM)=CNVRT$(N11$,AMT)
  LET C=C+1 : LET PASSEDDATA$(C)=LPAD$(STR$(CR),10,"0")&F$(REQ_REQPON)&F$(REQ_REQBYR)
Merq_FilterList_Done: !
 fnend
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 401
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: Screenio Listview Filterlist question

Post by Gabriel »

I don't think you can change the color of the currently selected line in BR listviews.

If you can show me the syntax to do it in BR i'll tell you how to do that in ScreenIO. A lot of BR syntax is supported by ScreenIO if you just put the right specification in the right place.

For example, if you can control this color in BR by specifying it on the ",ATTR=" part of your input fields statement, then you can specify that in the Window Attributes for the Screen, in the "Input Attr:" field. Try putting the color you want there and see if it does what you want.

You can change that value at Run Time by setting the value of ScreenIO$(si_inputattr) from any of your custom functions.
input attributes screenio.png
input attributes screenio.png (24.83 KiB) Viewed 7965 times
If it is not currently supported by ScreenIO but there's a way to do it in BR, then I will improve ScreenIO to support this and release an update.
gordon
Posts: 337
Joined: Fri Apr 24, 2009 6:02 pm

Re: Screenio Listview Filterlist question

Post by gordon »

The ATTR parameter of INPUT FIELDS and INPUT SELECT statements can reference named ATTRIBUTE definitions. Named ATTRIBUTE statements can specify a substantial set of attributes including font and foreground and background colors. ATTRIBUTE [names] can be up to 12 characters in length and can be specified and cleared via EXECUTE "CONFIG ATTRIBUTE xxxx" statements.
bluesfannoz
Posts: 274
Joined: Fri Jun 19, 2009 9:01 am
Location: Topeka, Kansas
Contact:

Re: Screenio Listview Filterlist question

Post by bluesfannoz »

I need an Attribute that would make the foreground Blue and background Transparent so the Red Text that is already there would remain and show through.

I am not good with Attributes. So any assistance in creating the correct Attribute for the Selection on an INPUT SELECT.
Steve Koger
Computer Specialist
SEKESC-MACS Division
bluesfannoz
Posts: 274
Joined: Fri Jun 19, 2009 9:01 am
Location: Topeka, Kansas
Contact:

Re: Screenio Listview Filterlist question

Post by bluesfannoz »

See below how when I have moved the selection I want the Text that is Red to remain Red even when its highlighted
Capture.PNG
Capture.PNG (9.07 KiB) Viewed 7957 times
Capture2.PNG
Capture2.PNG (9.06 KiB) Viewed 7957 times
Steve Koger
Computer Specialist
SEKESC-MACS Division
gordon
Posts: 337
Joined: Fri Apr 24, 2009 6:02 pm

Re: Screenio Listview Filterlist question

Post by gordon »

The wiki indicates that /RGB:T indicates a transparent background. I haven't tested that recently:

http://brwiki2.brulescorp.com/index.php ... e_(Screen)

Possibly that could be used to red flag something by highlighting it's background instead of setting the font itself to red, and then using T as the ATTR background which would let the individual text background colors to show through.
Gabriel
Posts: 401
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: Screenio Listview Filterlist question

Post by Gabriel »

bluesfannoz wrote:I need an Attribute that would make the foreground Blue and background Transparent so the Red Text that is already there would remain and show through.

Any assistance in creating the correct Attribute for the Selection on an INPUT SELECT.
The text color is the Foreground color. The space around the text is the Background color.

You're wanting to use Transparent for the foreground and blue for the background to achieve what you want. But i don't believe that Transparent for the foreground works the way you're expecting it to in BR.

You could use Red for the foreground and blue for the background. But that isn't going to help when you have a different line that is colored a different way.

Its possible that it might work the way Gordon is describing -- change the background color of the text to red instead of the foreground, and then try using transparent for the background color for the Input Attr field.

Regarding ScreenIO, you specify this color in the Input Attr field.

Gabriel
Gabriel
Posts: 401
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: Screenio Listview Filterlist question

Post by Gabriel »

Gordon,

I just tried it, and in my testing, saying "ATTR=/#FF0000:#00FF00" in the input fields does not seem to set the Listview hi-lite color.

Are you able to change the color of the listview hi-lite color this way? (or any other way?)

Gabriel
John
Posts: 554
Joined: Sun Apr 26, 2009 8:27 am
Location: West Orange, NJ
Contact:

Re: Screenio Listview Filterlist question

Post by John »

To my knowledge, the transparent setting has never worked for foreground colors, it was only ever developed for the background.
John Bowman
Post Reply