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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I get the highlight bar on mulitple browses to all be on the top? 2

Status
Not open for further replies.

rleiman

Programmer
May 3, 2006
258
US
Hi Everyone,

On a browse procedure there are 3 file loaded listboxes. When you navigate on the parent listbox the other ones display their respective child rows.

Currently when you navigate in the parent listbox the highlight bar on the child listboxes jump to the last row in each listbox.

Can you tell me how to make the highlight bar stay at the top row of each child listbox whilst navigating the parent listbox?

Thanks.

Emad-ud-deen Richard Leiman
 
Hi Emad,

Simplest way is SELECT(?ChildBrowse, 1) followed by a DISPLAY(?ChildBrowse).

The question is where ???

Ideal places would be BRWn.ResetQueue - after parent call in the child browses OR BRWn.TakeNewSelection - after parent call in the Parent Browse. I would try the ResetQueue first.

Regards
 
Hi ShankarJ,

Thanks for the helpfull reply.

I will give it a try.

Truly,
Emad
 
Hi ShankarJ,

I did a lot of experimenting but found out that when I added the code, the value being primed into the child table was always the one from the top parent row (catch 22!).

I found another way around the problem. I discovered the "Extended" tab in the listbox properties window that allowed me to make the listbox sort by pressing the column header. When I implemented it, the highlight bar jumped to the top row as I navigated in the parent listbox and I did not have the priming problem either.

Truly,
Emad
 
Hi Emad,

Another choice was POST(EVENT:ScrollTop, ?ChildBrowse) which will simulate a Home Key. This will rescan the table and that's why I did not suggest it earlier. Just add the following code on the EVENT:NewSelection of the Parent Browse - after Parent call :

POST(EVENT:ScrollTop, ?ChildBrowse1)
POST(EVENT:ScrollTop, ?ChildBrowse2)

If you have set the Child Browses to be Range Limited by Value (Single/Range) and NOT File Relationship, the you could replace the POST()s with a

BRWn.ResetSort(True)

for every child browse.

Regards

Regards
 
Hi ShankarJ,

Thanks for the answer. I will try that one too tonight.

The child browses are tied together by file relationship.

By the way, did you ever think of posting "Tips & Tricks" for all of us since you really know a lot about the product?

Truly,

Emad
 
Hi Emad,

I have been programming in Clarion since 1989.

Regards
 
Hi ShankarJ,

Wow! Thats a long time.

Truly,
Emad
 
IF you never solved this you can try:
?ChildList{PROP:SELECTED} = 1
Put the code in TakeNewSelection of the parent browse, priority 5000
 
Hi ChrisH2,

Thanks for the code. Next time I will try all the techniques everyone gave me to see which one runs the quickest.

Truly,
Emad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top