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

buttons highlighting

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
We have a form with multiple pages where we have buttons that are letters A to Z. If we click on a number of the buttons, all remain highlighted - but only if they are on a page (e.g. - click A C M - all are highlighted). Another unusual event - if you mouse over all of them (just drag mouse over without clicking - only the last one click remains highlighted).

We have a similar form with the buttons on the form - those buttons work as expected. Click next and next is highlighted - click previous and next goes back to normal shading and previous is highlighted.

Has anyone else seen this particular behavior?
 
How is the code in the methods of the buttons that do what you want different from the buttons that don't?

Brian
 

Samsnead,

"If we click on a number of the buttons, all remain highlighted"

So, you click and the first and third buttons, and all 26 of them become highlighted? Is that what you're saying?

And what do you mean by highlighted?

And what kind of buttons are these: Command buttons? Graphical option buttons? Graphical checkboxes?

You also say that if you drag the mouse over them, only the last one clicked remains highlighted. But if you are dragging the mouse, you are not clicking.

Sorry if I'm missing something here, but it would help if you could clarify these points.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike - no if you click on first then third, those two buttons remain highlighted. If I click on another then all 3 are - but if I move my mouse over the first two then highlight is only on third. We have themes set to .t. specialeffect is set to 3D. By highlight I mean that the button border is shaded a different color than rest of button (same as if mouse if over the button).
 
I did some further testing - the code on the offending buttons executes following code which repositions a grid of names and addresses.

Thisform.RepositionGrid(SUBSTR(This.Name,4,1))
method is below
PARAMETERS lcletter
&& Alphabetic quick-move buttons to 1st letter of lastname

SET NEAR ON && in case requested letter non-existent, then go to next
&& Use the letter passed from the cmdButton name for repositioning, e.g. cmdA="A"

SEEK lcLetter IN contacts

* Thisform.Pageframe1.Page1.Refresh()
Thisform.Pageframe1.Page1.grdRecords.Refresh()
Thisform.Pageframe1.Page1.grdRecords.SetFocus()
SET NEAR OFF

If I don't execute this code, then the button acts normally.

 
I found a solution - I put a this.setfocus() after

Thisform.RepositionGrid(SUBSTR(This.Name,4,1))

on each button and now is ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top