Normal Topic Command button with image overlay (Read 985 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Command button with image overlay
Oct 19th, 2005 at 5:48pm
Print Post Print Post  
I am practically brand new to Sesame and vice-versa.  With some great help from Ray Yoxall, I have learned how to put a command button on a form with a static image overlaying it.  I've changed the back fill property of the button to none, so that it appears to be invisible, and then positioned the static image element on top of the button. This way when the user clicks on the image they are actually clicking on the command button underneath and firing it's on-element entry event.

When I preview the application everything works fine...to a point.  The command fires off and the programming runs (I'm using the pop-up calendar as my programming event, just to test it.)  However, once I perform the resulting action (in this case, selecting a day, which places the date into a recipient element) the button turns gray.  The image disappears until I click elsewhere on the form.

Does anyone know what I'm doing wrong?  I'll be happy to send the .db, .dsr, and image elements to anyone who can help me out.

Thanks in advance.

**
Captain Infinity
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Command button with image overlay
Reply #1 - Oct 19th, 2005 at 6:02pm
Print Post Print Post  
Try adding ForceRedraw() as the last line of your command button code.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button with image overlay
Reply #2 - Oct 19th, 2005 at 6:13pm
Print Post Print Post  
Tried as you suggested, no luck.  I tried ForceRedraw() as the last line of my "on element entry" programming, then as the only line of "on element exit".  No luck either way.

Actually, now that I look at the properties of the command button, the button changes to whatever color I have selected as back/fill.  I can't find a way to make the back/fill "none" as Ray suggested.  Not sure if I'm looking in the right place.


**
Captain Infinity
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Command button with image overlay
Reply #3 - Oct 19th, 2005 at 6:34pm
Print Post Print Post  
Hello Captain Infinity,

You change the button fill type on the Look tab of the property editor. Under Box Fill choose None.


Try putting a Visibility call before and after the call to @Calendar(). ex.

Code
Select All
Visibility(MyButton, 0)
MyDate = @Calendar("", "Choose a Date")
Visibility(MyButton, 1) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button with image overlay
Reply #4 - Oct 19th, 2005 at 6:50pm
Print Post Print Post  
Hi Ray!

I found the fill setting, thanks.

The "visibility" programming had no noticeable effect, however.

By the way, how do you get the "code" section of your posts to look like that?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Command button with image overlay
Reply #5 - Oct 19th, 2005 at 6:54pm
Print Post Print Post  
Hi Scott,

Hmm it worked for me here on a sample. Tell you what send me the DSR and DDT files and I'll have a look at it.

About the code section if you look at the top of the box where you type in a response, you will see a button that has a # on it. This button will insert the code tags when clicked. you just put your sbasic code in between the tags.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Command button with image overlay
Reply #6 - Oct 19th, 2005 at 7:18pm
Print Post Print Post  
Hi Scott,

Your DSR and DDT files are heading back your way now.

What was happening was the Button was on top of the image element, and not the other way around like it should be. I switched them so the image is on top of the button and it seems to be working fine.

Let me know if you have any other problems.
-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button with image overlay
Reply #7 - Oct 19th, 2005 at 7:42pm
Print Post Print Post  
Thanks Ray, you're the best!
  

**
Captain Infinity
Back to top
IP Logged