Home > Archive > Clarion > February 2005 > BrowseInvertCheckOnLeftClick
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
BrowseInvertCheckOnLeftClick
|
|
| rwmorrison@bigfoot.com 2005-02-13, 8:55 pm |
| I have a browse for which I use the BrowseInvertCheckOnLeftClick
extension from ABC Free to toggle a checkbox in the browse. I have
enabled the Enable Sort Header option and the global properties for the
Browser class is configured to retain the row. When the checkbox is
clicked to toggle the checkbox, I want the record that was clicked to
be the highlighted record in the browse after the checkbox is updated.
All works fine as long as I have not clicked on any of the column
headers to sort by that column. After I click one of the column
headers to change the record sort I get erratic behavior. When I click
the checkbox in the browse the checkbox is toggled properly, but the
browse randomly jumps to another record in the browse queue rather than
highlighting the record that was clicked.
I have modified the BrowseInvertCheckOnLeftClick extension from ABC
Free to use:
%TheBrowseObject.ResetFromFile
%TheBrowseObject.PostNewSelection
rather than:
%TheBrowseObject.ResetFromBuffer()
This gives me better results with sorted headers, but not quite what I
need. Does anyone have any ideas on how I can modify this code to
always highlight the record that was clicked?
Randy Morrison
| |
| rwmorrison@bigfoot.com 2005-02-13, 8:55 pm |
| I appear to have resolved this issue and I wanted to post what I have
done in case anyone else encounters this issue. I modified the ABC
Free code in VSA_BRWG.tpw in the
Routine:InvertCheckmark:%ActiveTemplateI
nstance ROUTINE section:
#! %TheBrowseObject.ResetFromBuffer() ! or we
could have ResetFromFile/PostNewSelection
%TheBrowseObject.ResetQueue(Reset:Queue)
#! %TheBrowseObject.ResetFromFile
%TheBrowseObject.PostNewSelection
The ABC Free code used ResetFromBuffer() with the comment "or we could
have ResetFromFile/PostNewSelection". I tried this code, but it
produced the results described above. As the new code indicates, I
changed the ResetFromFile to ResetQueue(Reset:Queue) and now the browse
highlights the record for which I clicked the checkbox.
Is there any issue with using ResetQueue(Reset:Queue) rather than
ResetFromFile?
|
|
|
|
|