I subclassed NSTabView and added 5 TabViewItem, now I wanted to add an icon with the title in NSTabViewItem, anyone Suggestion that I can start, how do I get any documents except me,
- (zero) Draw label: (BOOL) should refer to the tricket label: ( NSRact) tabRect This means that if I override this method, then I would like the icon and the string C should have its own,
To set the title, I am using the following method,
[PTabViewItem setLabel: pLabelTitle]; Kind regards - Rohan
Ignore the following Code works for me,
- (zero) Draw Label: (BOOL) should be referenced in the Trinetate label (NSRact) tabract {// We have an image to draw NSImage * PImage = [pDelegate imageForCell]; [[NSGraphicsContext PresentContacts] SaveraphicState]; NSFIN TransCafe * EXForm = [NSaphine Transforms Transform]; [Format translateXBE: 0.0WB: TabRactIs. height]; [Xform scale xby: 1.0 yBy: -1.0]; [Extant consulate]; CGFloat x_Offset = 0; If (PIMAG) {[Pimage DrawRectects: NSMKRact (TabRact.Orgin.X-8, -6,16, 16): NSGroRyct Operation: NSCMopozet SourceOperator: 1.0]; X_Offset = 16; } [[NSGFixContactConstantx] BahragramfixState]; [Super Draw Label: shouldTruncateLabel inRect: tabRect]; } Why change:
The image was showing upside down, so I need to change,
why offset: even after the change, to accommodate me The condition is that it appears before the title,
and boys, when I set the title,
add a space, so the title will not overlap the image, I Know that this is an ugly attitude, but there is no faster way to do this. If I draw the text myself, then I will have to take care of sorting too,
thanks to those who saw the question and answer
kind of relationship - rohan
Comments
Post a Comment