NSComboBox like point size in TextEdit
NSComboBox like point size in TextEdit
- Subject: NSComboBox like point size in TextEdit
- From: "Lars C. Hassing via Cocoa-dev" <email@hidden>
- Date: Wed, 29 Jan 2020 22:56:40 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ccieurope.com; dmarc=pass action=none header.from=ccieurope.com; dkim=pass header.d=ccieurope.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XMn+dsAA/l6JRQJ1aqmDQr/TN2dqP5mo+VT+zs+TBWU=; b=Zw57XzVvMcEVwtgprSWnHmmqLFhNrEy4FyRFyW5Fe1x/99hIoayIap/FWIbm06j5vH6myKftJIEQRk5tg31jf9c+3XKTMAmxdWOhWJdNrNfieOFl0DPRk65AlFa1Af5ZyHwXed+rlIlcUxxuZRW4qVRh1Hp969zt+GSQ4S4XIFvyb85gtw9gBj8/DYU5j4kP1R2vzN8VyiWVkeDOU3TJ7wy2D25YS2JiGKnPLjSk4n8eKQh6D4wJJyTIsbBfeGyt5cAEBeUyV3461MMpOn+/vTpppa+vfjBznaEegELwxU/uFBjyfGQApFFGY51EKNuWwFwwkHcXA+3d7KGU7W5oSw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FAEE2t0L+umsMMsfDFah/Hayhn+I1+GJo7s1x2G2Mg2U79o+Z3aUTfRRFe9TK+BOVfcHV5/BdL+NluM+7nNr/3tjtUWZX6flZXjygyh7CnxTR48mXw/MYBFKpa4qContS//5z6glQ/ytkrkA+5nZK/oNq+8j4z00+V3eq8F+3QS4LJJd2lb+RAxLPKbTCIPC3nzqSdKHePJGvI6PtQ7xmnX49YERGWEc9aNFn0y5c0SMSpT6lBfa+xJlhBmjvmmpN57sdG8/ew6MBAe9NZ0Wuot2uG9IgeRoYxsEDAwmDtmdwGNOhmnwVJOYvFGRvklJUawG1Cg+ZZAniaFzsZW+eQ==
- Thread-topic: NSComboBox like point size in TextEdit
I want my NSComboBox to behave like the point size combo in TextEdit:
User places cursor in the combobox textfield,
User presses arrow down - the menu opens
User presses arrow down several times stepping down in the menu.
User presses Enter to select the highlighted point size.
- or user presses Escape to cancel the operation.
In any case I only seem to receive
comboBoxWillPopUp
comboBoxSelectionDidChange
comboBoxSelectionDidChange
comboBoxSelectionDidChange
comboBoxWillDismiss
textDidEndEditing is NOT called even though the NSComboBox changes the text in
case the user presses Enter.
Do I really have to note the current selection in comboBoxSelectionDidChange
and then in comboBoxWillDismiss examine the NSApp.currentEvent
to see if it was a key event that should apply the selection (Enter/Return) or
cancel (Escape/Tab)
or even a mouse event, the user may click in list to select or click outside
list to cancel!
I thought the AppKit was my friend and would handle all the details...
/Lars
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden