Patch for building a PlateButton with Toggle style

Dear all,

I was interested on a PlateButton that could be toggled (stay pressed
if not left-clicked again).

As I couldn't find this style, I've made a patch for it. Just sharing,
if anyone might be interested.

In order to use it, it is necessary to set style to:
"PB_STYLE_TOGGLE"

The new method "IsPressed" can be used to check if the button is toggled or not.

This patch was based on trunk r63277.

Regards,

Tatiana Al-Chueyr

toggle_platebutton.patch (960 Bytes)

Hello,

Dear all,

I was interested on a PlateButton that could be toggled (stay pressed
if not left-clicked again).

As I couldn't find this style, I've made a patch for it. Just sharing,
if anyone might be interested.

In order to use it, it is necessary to set style to:
"PB_STYLE_TOGGLE"

The new method "IsPressed" can be used to check if the button is toggled or not.

This patch was based on trunk r63277.

Thanks for you patch.

Here are a few suggestions that will need to be implemented before I
will apply it though.

1) When in Toggle mode the control should probably emit
EVT_TOGGLEBUTTON events instead of EVT_BUTTON.

2) The new style id should be exported from the module, which means it
needs to be included in the __all__ list.

3) Would be good to update the demo file to have a few buttons using this style.

4) Please use a Unified Diff format for patches. (This is the default
if your using the svn client to make a patch).

Thanks,

Cody

ยทยทยท

On Tue, Jan 26, 2010 at 8:20 AM, Tatiana Al-Chueyr <tatiana.alchueyr@gmail.com> wrote: