How to collapse buttons in xcode cocoa mac - macos

Question in short: How to collapse a button?
Question in long: I have an empty app with three push buttons that are populated in a row. When resizing window down I would like the button that is getting hidden to collapse to a lower row and vice versus.
Any help is appreciated.

Related

Vuetify 3 bottom v-navigation-drawer with tabs and scrollable content not closing on swipe down

I am using Vuetify 3 to create a bottom sheet for mobile using v-navigation-drawer with location="bottom" prop.
Everything works fine up to this point with swipe-down to close the bottom sheet. When I add touchstart, touchmove, touchend event listeners, all get triggered as expected.
But when I try to add a Tab component as per the documentation with some overflow content, the bottom sheet overflow scrolls on swipe up and down and tab navigation works on swipe left and right. I believe this is because of v-window is inside the drawer. Here when I add the above event listeners, touchstart does not get triggered inside the bottom sheet.
I want to implement the swipe-down to close behaviour (following the finger position) to the bottom sheet tab navigation that has overflow content. The bottom sheet will open on toggle, scrolls up and down on swipe up and down, switches tabs on swipe left and right and closes on swipe down further.
But without touchstart event it is impossible for me to go forward with this feature. (I'm planning to get the swipe direction and build the logic when to pull down the bottom sheet)
What am I missing here? Is there any other way to implement this?
CodePen link to what I tried. (Toggle device emulation)
add touchless to draver
<v-navigation-drawer
v-model="app.drawer"
touchless
app
>

change ListView item image at runtime (firemonkey)

I need the ability for a user to press and set an ListView item's checkbox independently of clicking on the item. If they press on the checkbox I will add/remove the checkmark and take some action. If they press on the item text I can take another action.
I can do this with a ListBox no problem with built in functionality. I can't figure out how to do it with a ListView. How is it done?
I can put the following code in the ListView1ItemClickEx to know when the user is clicking on the image. Maybe I can just change the image to a checkmark?
if (ItemObject->Name == "I") {
ShowMessage("Item Image clicked");
}
But I don't know how to change that particular items image (e.g. I could just toggle between a checkmark image and an unchecked image) at runtime.
The picture below is for clarity. Clicking anywhere in the red box will change the items checkbox. For the ListBox clicking anywhere in the blue box will fire the OnClick event and not change the checkbox. I want that same behavior in the ListView.
Ok, Remy answered this related question and it helped me solve this issue. Now I can make the ListView have a checkbox that functions like that of the ListBox. I do it by toggling the item image whenever the user presses (or clicks on) the image area of an item.
When the user clicks an items image I trap it (per Remy's code in the ListView1ItemClickEx event) and toggle it from 0->1 or 1->0 in a vector at reference ItemIndex (e.g. myVector[ItemIndex] = 0) and then I completely rebuild the ListView (clear it and build from scratch).
I thought I'd have to remember where in the list I had scrolled down to and after refreshing the ListView I'd have to scroll to that point in code - but, that isn't the case. I don't know why but after the refresh I'm still at the point in the list where I clicked an item image. It makes it work and feel exactly like a check box.
It works great in iOS, Android, and Windows.
p.s. I forgot to mention that you need to treat any Header's like they are items in your vector that keeps up with each items' image (0 or 1). Otherwise adding headers gets you out of sync and clicking an item's image will toggle some other item's image.

weird storyboard item positions in Xcode8

I have been having a problem with the Xcode8 storyboard. Whenever I embed a table view in a navigation controller, the various items (labels, buttons, etc.) that I drag into the cell will have a weird vertical offset. Basically, if there is a label in the cell, I will have to click below where it actually is to select it. Anybody else ever had this problem?

Cocoa radio buttons disappear when clicked

I have a window with two radio buttons. When I click one of them, both disappear. The "selected" highlight remains. If the windows looses focus and I switch back, the buttons return, only to disappear again when I click one of them.
I'm quite lost, I don't even know where to begin. Do you have any suggestions?

How do I build a toolbar in my title bar?

I have to implement a custom toolbar for my application, where a button will be placed on the side of exit, maximize and minimize buttons.
I tried to work with the toolbar element on XCode, but it always put elements below these buttons and not on the side.
App Store application implement this feature, like you can see in this image.
One solution is to start with this open source code (https://github.com/indragiek/INAppStoreWindow) to give you the correct title bar style, and then position buttons in the titlebar.

Resources