[Mono-dev] Trying to change font size in pickerview can anyone translate this to c#

Rodrigo Kumpera kumpera at gmail.com
Thu May 3 11:51:01 UTC 2012


You should try the monotouch or mono-mac lists for MonoTouch of MonoMac
questions.

Anyway, what you want is probably something like this:

public UIView GetView (UIPickerView pickerView, int row, int component,
UIView view) {
   UILabel tView = (UILabel)view;
   if (tView == null)
     tView = new UILabel ();
  ...
}

Remember to put this method in a class that extends UIPickerViewDelegate.

Hope it helped.

Cheers,
Rodrigo


On Wed, May 2, 2012 at 2:58 PM, Mike Murdock <mmurdock at allmeds.com> wrote:

>   - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row
> forComponent:(NSInteger)component reusingView:(UIView *)view{ ****
>
>     UILabel* tView = (UILabel*)view; ****
>
>     if (!tView){ ****
>
>         tView = [[UILabel alloc] init]; ****
>
>             // Setup label properties - frame, font, colors etc ****
>
>             ... ****
>
>     } ****
>
>     // Fill the label text here ****
>
>     ... ****
>
>     return tView;****
>
> ** **
>
> *Michael Murdock *
> *Software Engineer*
>
> (865) 482-1999
> (865) 481-0921 fax
> www.allmeds.com****
>
> ** **
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120503/2a9c6889/attachment.html>


More information about the Mono-devel-list mailing list