Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent Selection Needed

Status
Not open for further replies.

cathalturi

Programmer
Sep 29, 2003
14
DE
Normally, clicking a record in a browse will mark it dark blue. Also, the first record is marked automatcally on opening the window.

What I need is:

1) No auto-select on window open.
2) If a record is selected, it's line should not change color. If possible, I would like to have it framed by a thin border.
3) The selcetion should only exist as long as the mouse button is pressed. If this is not possible, there should be another way of removing any selections from the list.

If you know how this is done - please let me know!

 
?List{PROP:Color,3} is the color of the selection bar
?List{PROP:Color,1} is the color of the background
?List{PROP:Color,2} is the color of the text

If you do :

?List{PROP:Color,1} = Color:None
?List{PROP:Color,2} = Color:Black
?List{PROP:Color,3} = Color:White

Then you will just have a little frame around the selected item....

To have nothing selected then select another control ie OK
button : Select(?Ok)


 
In the List Properties, set Hide Selection to True. This should prevent the Selector Bar from displaying. Use the Same Colours for Normal & Selected (ForeGround & BackGround) ensures that the displayed colour does not change on Selection except for a thin dotted outline. If you need to do some processing on Mouse Clicks, you should trap the Keycode in the TakeKey Method of the Browse or the AlertKey embed of the List Control and so the needful. ?List{proplist:mousedownrow} will give you the row over which the mouse is clicked. To select that record do the following :

C# = ?List{PROP:MouseDownRow}
SELECT(?List,C#) ; DISPLAY(?List)
GET(Queue:Browse, C#)
BRW1.UpdateViewRecord

WHERE ?List is the List Control, Queue:Browse is the Browse Queue and BRW1 is the Browse Object.
 
@ -> ShankarJ:
Thank you for your response. I've tested the 'HIDE' option within the list menu. The effect I achieved was that the entire listbox was hidden... Am I using the wrong control?

 
Ooops. My mistake. I chose the wrong control. 'Hide Selection' works fine. Please disregard my previous posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top