Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invisible Command Buttons
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539138
Message ID:
00539559
Views:
12
>Kevin,
>
>The outline you are talking about is the Focus rectangle and is there for a purpose. However if want to stop this being displayed then put NODEFAULT into the GotFocus() method of the button. One thing you should be aware of is that this works well with invisible buttons but if you use this trick on a standard 3D button then the button will not animate.
>
>HTH
>Neil

Thanks for the reply!

Unfortunately this also prevents the MouseDown event from firing. I can force the MouseDown event to fire from within the GotFocus event, but then the box flashes on/off on the MouseUp event. I can't find a way to get rid of this flashing, and in a way it's more annoying then the consistant box.

---

This seems to be all fairly basic, so stop me at any time if I'm wildly off from a much simpler solution.

A little history: I'm doing this in order to have the illusion of "pretty" buttons using images and labels. I'm trying to give the effect of the button moving down on MouseDown and up on MouseUp. If I just had a picture it would be a simple matter of modifying it's methods, but with the label in place I decided it would be easier to cover it all up with a single object to keep all the code modifications are in one place.

This seemed to be the perfect task for an invisible button; it's a button after all! The code itself didn't take any more then 10 - 15 minutes to produce, and I'm happy with the results with the exception of the border. I can use a shape or, as Mr. Basoz suggested, a container, but that seems... wrong to me somehow. But if that's what has to be done then that's what I'll do!
- Kevin Yockey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform