Hey everyone, I’ve been fighting with DesktopListboxes a bit over the weekend and wondered if anyone knows of a way to access a pointer/reference to the ListboxController.
It seems to have its own frame, which is resulting in some issues with how I want to implement my SplitView/StackView. Using an automask or constraints via Declares on the Listbox itself makes the listbox visually appear in the correct place after adding it into my view - however the controller remains in the original location. (So to click the cell you want you have to click where the listbox used to be…)
I’ve swizzled the setFrame method and got it all working nicely when the window is an implicit instance, but it gets complicated awful quickly when you start implementing multiple tabs/windows (as the method/delegate for it has to directly reference the Window.Listbox.Handle due to how shared methods can’t really access self.)
(Obviously I can just do the math and manually size it on window resize but I’d really prefer not to do that here)
Thanks!
8 posts - 4 participants