I want my app to create a text box where the user clicks on any time when I click on a text box How do I synthesize? OneNote as a Kind
Then how do I synthesize a text box on demand.
You create a text view or text field, and then you can add it to your view wherever you want. Assuming that you have a click event in
event and you know the
width and
height of the text view that you want to create, Do this:
NSPoint * p = [myContainerView Convert Points: [Event Location InWindow] View: zero]; NSRact frame = NSMKACT (P.X, P.E., width, height); NSTextView * tv = [[NSTextView alloc] initWithFrame: frame]; [MyContainerView addSubview: TV];
No comments:
Post a Comment