A scrolled list is a CwList widget with scrolling capability. All resources and callbacks associated with lists can be applied to scrolled lists. The scrolling mechanism is handled automatically.Creating a scrolled list inserts a CwScrolledWindow parent between the list and the receiver of the creation message. In other words, createScrolledList:argBlock: returns an instance of CwList (the child of a CwScrolledWindow); however, the CwScrolledWindow is the child of the form. Form attachment messages must therefore be sent to the CwList's parent.In the following example, a scrolled list widget is created as a child of a form. The list selection policy is set to XmSINGLESELECT. A singleSelection callback is added, corresponding to the selection policy.If other children of a form are to be attached to a scrolled list, which is a child of the form, using XmATTACHWIDGET, they must be attached to the scrolled list's parent.
|