I dont have my mac here, so I can't try it out, but it should just be
the entry alignment - the rest is taken care of with the method
ComputeEntryPosition (line 1424)

I do it in tripwallet:

https://gist.github.com/1705400

(tho I'm also using a date picker as the entry view, which was swiped
off someone else - Brian C. I think)

Can you post your new Element? Might be something simple.



On Mon, Jan 30, 2012 at 16:17, MojoDK <[email protected]> wrote:
> Hi Nic,
>
> Well I already tried what you said. I copied the EntryElement code and
> replaced all EntryElement to MojoEntryElement.
>
> I added these two lines:
>
> entry.TextAlignment = UITextAlignment.Right;
> entry.BackgroundColor = UIColor.Red;
>
> (Red just for debug)
>
> And here's the result:
>
> http://monotouch.2284126.n4.nabble.com/file/n4341467/iOS_Simulator.png
>
> First I need the width to be cell width minus the caption width. Second, the
> TextElement position is jumping around (as seen in the image).
>
> I hoped I could do something like ....
>
> var size = tv.StringSize (base.Caption, font);
> float entryWidth = tv.Frame.Width - size.Width;
> entry = CreateTextField (new RectangleF (tv.Frame.Width - entryWidth + 10,
> yOffset, entryWidth - 110, size.Height));
>
> But it still doesn't work.
>
> So I hoped that somebody already made a right aligned entryelement and I
> could examine his code. :)
>
> Thanks.
> Mojo
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/MT-Dialog-right-aligned-EntryElement-tp4341288p4341467.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to