Managing TreeView items – PB Docs 90
Managing TreeView items An item in a TreeView is a TreeViewItem structure. The preceding section described how to set the item’s properties in the structure and then insert it into the TreeView. This code declares a TreeViewItem structure and sets several properties:
1 |
TreeViewItem tvi_defined<br /> <br /> tvi_defined.Label = "Symphony No. 3 Eroica"<br /> tvi_defined.StatePictureIndex = 0<br /> tvi_defined.PictureIndex = 3<br /> tvi_defined.SelectedPictureIndex = 4<br /> tvi_defined.OverlayPictureIndex = 0<br /> tvi_defined.Children = TRUE |
For information about Picture properties, see “Managing TreeView pictures”. When you insert…
Managing TreeView pictures – PB Docs 90
Managing TreeView pictures PowerBuilder stores TreeView images in three image lists: Picture list (called the regular picture list here) State picture list Overlay picture list You add pictures to these lists and associate them with items in the TreeView. Pictures for items There are several ways to use pictures in a TreeView. You associate a…
Identifying the dragged control – PB Docs 90
Identifying the dragged control To identify the type of control that was dropped, use the source argument of the DragDrop event. This script for the DragDrop event in a picture declares two variables, then determines the type of object that was dropped:
1 |
CommandButton lcb_button |
1 |
StaticText lst_info |
1 |
1 |
IF source.TypeOf() = CommandButton! THEN |
1 |
lcb_button = source |
1 |
lcb_button.Text = "You dropped a Button!" |
1 |
ELSEIF source.TypeOf() = StaticText! THEN |
1 |
lst_info = source |
1 |
lst_info.Text = "You dropped the text!" |
1 |
END IF<i></i> |
Using CHOOSE CASE If your window has a large number of controls…
Chapter 9 Using TreeView Controls – PB Docs 90
Chapter 9 Using TreeView Controls About this chapter This chapter describes how to use TreeView controls to present hierarchical information in an expandable list. Contents Topic About TreeView controls Populating TreeViews Managing TreeView items Managing TreeView pictures Using DataWindow information to populate a TreeView Document get from Powerbuilder help Thank you for watching.
About TreeView controls – PB Docs 90
About TreeView controls TreeView controls provide a way to represent hierarchical relationships within a list. The TreeView provides a standard interface for expanding and collapsing branches of a hierarchy: When to use a TreeView You use TreeViews in windows and custom visual user objects. Choose a TreeView instead of a ListBox or ListView when your…
Defining and managing tab pages – PB Docs 90
Defining and managing tab pages A tab page is a user object. Two methods There are different ways to approach tab page definition. You can define: An embedded tab page In the painter, insert tab pages in the Tab control and add controls to those pages. An embedded tab page is of class UserObject, but…
Customizing the Tab control – PB Docs 90
Customizing the Tab control The Tab control has settings for controlling the position and appearance of the tabs. Each tab can have its own label, picture, and background color. All tabs share the same font settings, which you set on the Tab control’s Font property page. Pop-up menus and property sheets for Tab controls and…
Opening the sample applications – PB Docs 90
Opening the sample applications To open a sample application, you need to create a workspace for the application and then add the target for that application to your workspace. If there is no target file for an application, you can still add it to your workspace. Select Existing Application from the Target tab of the…
Using Tab controls in scripts – PB Docs 90
Using Tab controls in scripts This section provides examples of tabs in scripts: Referring to tab pages in scripts Referring to controls on tab pages Opening, closing, and hiding tab pages Keeping track of tab pages Creating tab pages only when needed Events for the parts of the Tab control Referring to tab pages in…
Chapter 8 Using Lists in a Window – PB Docs 90
Chapter 8 Using Lists in a Window About this chapter This chapter describes how to use lists to present information in an application. Contents Topic About presenting lists Using lists Using drop-down lists Using ListView controls Document get from Powerbuilder help Thank you for watching.