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!

Strange Behaviour of MouseDown in Pageframe.Page

Status
Not open for further replies.

TedMcCoin

Programmer
Feb 19, 2003
14
0
0
DE
Has anyone discovered this situation on pageframes ?

I wanted to code different behaviour on RIGHTCLICK or LEFTCLICK on a Page of a Pageframe and so I got some code under MouseDown of a given Page.

Lets assume I want to do this:

LEFTCLICK this.caption="Hello Page Caption Left"
RightCLICK this.caption="Hello Page Caption Right"

I noticed, that the MouseDown Code of the Page is not executed when MouseDown on the TAB, what indeed is the caption and belongs to the page.

It lookes like the Tabs/Caption belong to the Pageframe, rather than to the Page, it's confusing because the caption clearly is defined on the Page.

The Code is excecuted fine when the Page opens and Clicked just below the Tab, but that's too late for my example above.


Has anyone any idea how to circumvent this behaviour ?

thanks for any ideas, Erik
 
I looked at the pageframe page properties and it has a RIGHT CLICK method on each page. You could add your code right there. If you want to get fancy, add it to your pageframe baseclass (if you have one) and check for the current page number.

As for the left mouse click - no such method. That is your Click event.



Jim Osieczonek
Delta Business Group, LLC
 
Jim,

thanks for your quick answer, the problem is, that the active.page is the one I am leaving, not the one I want to go to and change.

Any Idea ?

thanks, Erik
 
In the future please post threads like this in

Microsoft: VFP - Forms, Classes and Controls Forum (6 members)
forum1254

boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Ok, so you want to be able to click on the tabs at the top (either with a right-click or left-click) and have something happen to the page that that tab belongs to? What do you want to happen? Just change the caption of the tab or something more on the page itself?

boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Hi Craig,

yes, you can take that just as an example.
To know how to change the caption of the page would be helpful enough.

Later I want a supervisor to enable or disable specific pages just by right/left click for certain users.

This would work fine when you click on the page after it is opened, but not from the TABs.

Thanks, Erik

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top