pub struct TabsContainer {
pub handle: ControlHandle,
/* private fields */
}
Expand description
A tabs container is a frame-like control that can contain Tab
control.
Tabs are added by specifying the TabsContainer
as parent in the Tab
builder.
Do not add other control type as children to the TabsContainer
Requires the tabs
feature
Builder parameters:
parent
: Required. The button parent container.position
: The tab container position.font
: The font used for the tabs titleflags
: A combination of theTabsContainerFlags
values.ex_flags
: A combination of win32 window extended flags. Unlikeflags
, ex_flags must be used straight from winapiimage_list
: The image list specifying the tabs icons
Control events:
TabsContainerChanged
: The select tab of a TabsContainer changedTabsContainerChanging
: The selected tab of a TabsContainer is about to be changedMousePress(_)
: Generic mouse press events on the buttonOnMouseMove
: Generic mouse mouse eventOnMouseWheel
: Generic mouse wheel event
Fields§
§handle: ControlHandle
Implementations§
Source§impl TabsContainer
impl TabsContainer
pub fn builder<'a>() -> TabsContainerBuilder<'a>
Sourcepub fn selected_tab(&self) -> usize
pub fn selected_tab(&self) -> usize
Return the index of the currently selected tab
May return usize::max_value()
if no tab is selected
Sourcepub fn set_selected_tab(&self, index: usize)
pub fn set_selected_tab(&self, index: usize)
Set the currently selected tab by index
Sourcepub fn set_image_list(&self, list: Option<&ImageList>)
pub fn set_image_list(&self, list: Option<&ImageList>)
Sets the image list of the tab container. Pass None to remove the image list.
This is only available is the feature “image-list” is enabled.
Sourcepub fn image_list(&self) -> Option<ImageList>
pub fn image_list(&self) -> Option<ImageList>
Returns a reference to the current image list in the tab container. The image list is not owned and dropping it won’t free the resources.
This is only available is the feature “image-list” is enabled.
Sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Return true if the control user can interact with the control, return false otherwise
Sourcepub fn set_enabled(&self, v: bool)
pub fn set_enabled(&self, v: bool)
Enable or disable the control
Sourcepub fn visible(&self) -> bool
pub fn visible(&self) -> bool
Return true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
Sourcepub fn set_visible(&self, v: bool)
pub fn set_visible(&self, v: bool)
Show or hide the control to the user
Sourcepub fn position(&self) -> (i32, i32)
pub fn position(&self) -> (i32, i32)
Return the position of the tabs container in the parent window
Sourcepub fn set_position(&self, x: i32, y: i32)
pub fn set_position(&self, x: i32, y: i32)
Set the position of the tabs container in the parent window
Sourcepub fn class_name(&self) -> &'static str
pub fn class_name(&self) -> &'static str
Winapi class name used during control creation
Sourcepub fn forced_flags(&self) -> u32
pub fn forced_flags(&self) -> u32
Winapi flags required by the control