Can't resize Floating-Number NSTextfield in NSPredicateEditor.
Can't resize Floating-Number NSTextfield in NSPredicateEditor.
- Subject: Can't resize Floating-Number NSTextfield in NSPredicateEditor.
- From: Gustavo Pizano <email@hidden>
- Date: Fri, 13 Aug 2010 15:33:38 +0200
Hello all, I come to you asking for humble guidance.
after reading the way to resize the TextFields in some other topic, I tried myself, without success..
This is what I have.
A parent view which display the panel that contains the predicate editor, this predicate editor controller (NSWindowController) has an @property (assign) pointing to the parent controller. In the parent controller I have a NSPredicate ivar which at the moment before initializing the panel, I initialize it with a Default Predicate.
In IB, I set via Bindings the value for the predicate editor to _parentController.predicate.
So when I run and click the button that display the panel, the panel appears and the predicate editor is there with the default predicate I set up. So far so Good.
But I can' t rezise the NSTextField view of a Floating-Double number, in my PanelController on the awakefromNib method I added this code:
NSArray * rtemplates = [pe rowTemplates];
for(NSPredicateEditorRowTemplate * peRT in rtemplates){
if([peRT rightExpressionAttributeType] == NSDoubleAttributeType){
NSView * v = [[peRT templateViews] lastObject];
if([v isKindOfClass:[NSTextField class]]){
NSRect frame = [v frame]; // comment 1
frame.size.width = 200;
[v setFrame:frame];
}
}
}
I set a Breakpoint into //comment 1, and I get the size of the field which is 25, then as you see I set it up to 200 and re-set the frame property.
But nothing happens I still see that field with the small size ....
What can I do?, what am I missing?... I have tried moving the code above to different methods such as the initWithNibName:, just testing ... with no good results either.
thanks
Gustavo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden