Changing the text in a BooleanElement

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the text in a BooleanElement

Paul Johnson
Hi,

Is there a way to alter the text in a BooleanElement from On/Off to
(say) Male/Female?

Paul
--
"Space," it says, "is big. Really big. You just won't believe how
vastly, hugely, mindbogglingly big it is. I mean, you may think it's a
long way down the road to the chemist's, but that's just peanuts to
space, listen..."
Hitch Hikers Guide to the Galaxy, a truly remarkable book!

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Changing the text in a BooleanElement

jawbrey
I don't think so.  You probably need to subclass it and override the Summary method

public override string Summary ()
{
return val ? "On".GetText () : "Off".GetText ();
}



On Tue, Jun 4, 2013 at 7:32 PM, Paul Johnson <[hidden email]> wrote:
Hi,

Is there a way to alter the text in a BooleanElement from On/Off to (say) Male/Female?

Paul
--
"Space," it says, "is big. Really big. You just won't believe how vastly, hugely, mindbogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space, listen..."
Hitch Hikers Guide to the Galaxy, a truly remarkable book!

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch


_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Changing the text in a BooleanElement

Nic Wise
The current BooleanElement uses a UISwitch, which you can't change the
text on :(

Yo could make your own using a port of RCSwitch - here's a slightly
old port I did a while back (or possibly, Clancey did it and I stole
it and cleaned it up or something)

https://gist.github.com/nicwise/5437804

On 5 June 2013 01:37, Jason Awbrey <[hidden email]> wrote:

> I don't think so.  You probably need to subclass it and override the Summary
> method
>
> public override string Summary ()
> {
> return val ? "On".GetText () : "Off".GetText ();
> }
>
>
>
>
> On Tue, Jun 4, 2013 at 7:32 PM, Paul Johnson <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> Is there a way to alter the text in a BooleanElement from On/Off to (say)
>> Male/Female?
>>
>> Paul
>> --
>> "Space," it says, "is big. Really big. You just won't believe how vastly,
>> hugely, mindbogglingly big it is. I mean, you may think it's a long way down
>> the road to the chemist's, but that's just peanuts to space, listen..."
>> Hitch Hikers Guide to the Galaxy, a truly remarkable book!
>>
>> _______________________________________________
>> MonoTouch mailing list
>> [hidden email]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch
>



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch