above creates a NSSegmentedControl and populates some default properties
if let rep = tempCtrl.bitmapImageRepForCachingDisplay(in: tempCtrl.bounds) {
tempCtrl.cacheDisplay(in: tempCtrl.bounds, to: rep)
osCtrlImage = NSImage(size: tempCtrl.bounds.size)
osCtrlImage!.addRepresentation(rep)
}
}
above is supposed to render the passed control, and create an NSImage of it, like I mentioned this works for everything else. For Segment it just returns a clear rectangle of the specified size,
but does it work with NSSegmentedControl , or Horz/Vertical Scrollbars, or tabbed panel
because those I will bet won’t work, as this code is almost identical to my original code which does work with every other control, except the ones named above.