Populating NSForm with NSComboBoxes

So, I have the task of reading from an XML file that contains a description of what form fields and combobox should exist in the dialog box. I started by using NSForm and addentry to add form fields, but then I discovered that NSMatrix might need to dynamically add combo boxes.

So my questions are:

1) Since NSForm inherits from NSMatrix, I can add combobox cells to NSForm after adding text fields.

2) If I need to use NSMatrix, someone has a good sample code that they can point me to or write by adding a text box, as well as a combo box to it at runtime, and then resize the NSMatrix to fit its contents. Many books simply describe what NSMatrix is ​​and show how to use it using the interface builder.

+3
source share
1 answer

NSForm does not allow you to customize cell types (text field only), and NSMatrix accepts only one cell type (you cannot have NSMatrix that has a combination of NSTextFieldCell and NSComboBoxCell).

+ , , .

.

. 10,7 , , , .

+4

Source: https://habr.com/ru/post/1766776/


All Articles