carviaso / google-checkout-dotnet-sample-code

Automatically exported from code.google.com/p/google-checkout-dotnet-sample-code
0 stars 0 forks source link

Setting "Enabled = false" does not display the grayed-out button #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This code should disable the Checkout button and display the grayed-out
graphic instead:

public void Page_Load(Object sender, EventArgs e) {
    GCheckoutButton1.Enabled = false;
}

But the blue regular button is shown. The "variant" parameter in the URL
used to get the graphic should be "disabled", instead of "text". Provide
some way, preferably through the Enabled property per the code above, for
merchants to display the gray button graphic.

Original issue reported on code.google.com by martin.o...@gmail.com on 10 Apr 2007 at 9:55

GoogleCodeExporter commented 9 years ago
Just tested v1.1 of the sample code. This bug appears for that version as well.

Original comment by martin.o...@gmail.com on 10 Apr 2007 at 10:05

GoogleCodeExporter commented 9 years ago
We would need to override the Enabled property and set the image.

I can make the change and verify it if you wish.

Original comment by joseph.f...@gmail.com on 10 Apr 2007 at 10:51

GoogleCodeExporter commented 9 years ago
Additionally, this bug could also be true for the style and locale fields.

This should also be fixed at the same time.

The reason for hte bug is the call to SetImageUrl(), any time a property is 
set, the 
method needs to be called :(

Original comment by joseph.f...@gmail.com on 10 Apr 2007 at 10:56

GoogleCodeExporter commented 9 years ago
v80 has been checked in with the bug fix.

Please verify on your side

Original comment by joseph.f...@gmail.com on 10 Apr 2007 at 11:00

GoogleCodeExporter commented 9 years ago
The fix works fine!

Original comment by martin.o...@gmail.com on 11 Apr 2007 at 4:42