Adds a tab to the control.

Syntax

Handle = Send_Message(Ctrl, "OLE.AddTab", Caption, Image, Enabled)

Parameters

ParameterDescription
CaptionThe text to appear on the new tab
ImagePath to the image to appear on the new tab
EnabledDetermines if the new tab is enabled (1) or disabled (0)

Returns

Handle to the new tab.

Remarks

The AddTab method adds a new tab to the end of the tab control. You pass the caption, image, and initial enabled state of the new tab. This method returns a handle to the tab. A handle is a number that identifies this tab. You can use the HandleToIndex method to convert the handle to an index.

Example

// Add a new tab and get its index
TabHandle = Send_Message(@Window:".OLE_TAB", "OLE.AddTab", "My New Tab", "BMPS\TabImage3.png", 1)
TabIndex = Send_Message(@Window:".OLE_TAB", "OLE.HandleToIndex", TabHandle)

See Also

RemoveTab

  • No labels