Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Task Pane Manager suggestion
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00719309
Message ID:
00719352
Views:
23
>You have the code, you can make the change yourself.
>
>>One (simple) suggestion for the task pane - add a "Back" button to the top row of buttons. You can right-click and select "Back", but that's not good enought for me <g>

Yeah, but I want everyone to share in the joy that is known as a "Back" button ;-) OK, I already added it. If anyone wants to add their own, all I did was add a new instance of the FoxPaneCtrls::CFoxButton to the FoxPane form - I added it between the Home and Refresh. I copied the "back" button graphic off of VS.NET and created a mask for it. Then I set the caption, graphic, and tool tip accordingly. In the Click method I added the code:
ThisForm.GoBack(). 
Then I created a GoBack method that has the following code:
IF TYPE("This.pgfPane.Page1.oPaneBrowser.oBrowser") = "O" AND !ISNULL(This.pgfPane.Page1.oPaneBrowser.oBrowser)
   TRY
      This.pgfPane.Page1.oPaneBrowser.oBrowser.GoBack()
   CATCH
   ENDTRY
ENDIF   
Then I modified the OnResize() method (adding my cmdBack button, and adjusting the THIS.cmdHome code accordingly):
This.cmdBack.Left = THIS.cmdRefresh.Left - THIS.cmdHome.Width - 2
THIS.cmdHome.Left = THIS.cmdBack.Left - THIS.cmdHome.Width - 2
OK, so this isn't the most elegant code (it'd be nice to disable the "Back" button when at the top of the History stack), but it works. Interestingly, all of the links only go one level, so it turns out, a "Back" button isn't as useful as I though (until deeper links are added to the form).

BTW - the TRY/CATCH stuff is great. What a great/simple way to trap errors.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform