pub struct GuiButton { /* private fields */ }
Expand description

GuiButton represents all push buttons that are on dynpros, the toolbar or in table controls. GuiButton extends the GuiVComponent Object. The type prefix is btn, the name property is the fieldname taken from the SAP data dictionary There is one exception: For tabstrip buttons, it is the button id set in screen painter that is taken from the SAP data dictionary.

Implementations§

source§

impl GuiButton

source

pub fn press(&self) -> Result<()>

This emulates manually pressing a button. Pressing a button will always cause server communication to occur, rendering all references to elements below the window level invalid.

source

pub fn emphasized(&self) -> Result<bool>

This property is True if the button is displayed emphasized (in Fiori Visual Themes: The leftmost button in the footer and buttons configured as “Fiori Usage D Display<->Change”).

source

pub fn left_label(&self) -> Result<SAPComponent>

Left label of the GuiButton. The label is assigned in the Screen Painter, using the flag ‘assign left’.

source

pub fn right_label(&self) -> Result<SAPComponent>

Right label of the GuiButton. This property is set in Screen Painter using the ‘assign right’ flag.

Trait Implementations§

source§

impl GuiBoxMethods<GuiButton> for GuiButton

source§

fn char_height(&self) -> Result<i64>

Height of the GuiBox in character metric.
source§

fn char_left(&self) -> Result<i64>

Left coordinate of the GuiBox in character metric.
source§

fn char_top(&self) -> Result<i64>

Top coordinate of the GuiBox in character metric.
source§

fn char_width(&self) -> Result<i64>

Width of the GuiBox in character metric.
source§

impl GuiComponentMethods<GuiButton> for GuiButton

source§

fn container_type(&self) -> Result<bool>

This property is TRUE, if the object is a container and therefore has the Children property.
source§

fn id(&self) -> Result<String>

An object id is a unique textual identifier for the object. It is built in a URLlike formatting, starting at the GuiApplication object and drilling down to the respective object.
source§

fn name(&self) -> Result<String>

The name property is especially useful when working with simple scripts that only access dynpro fields. In that case a field can be found using its name and type information, which is easier to read than a possibly very long id. However, there is no guarantee that there are no two objects with the same name and type in a given dynpro.
source§

fn kind(&self) -> Result<String>

The type information of GuiComponent can be used to determine which properties and methods an object supports. The value of the type string is the name of the type taken from this documentation.
source§

fn kind_as_number(&self) -> Result<i64>

While the Type property is a string value, the TypeAsNumber property is a long value that can alternatively be used to identify an object’s type . It was added for better performance in methods such as FindByIdEx. Possible values for this property are taken from the GuiComponentTypeenumeration.
source§

impl GuiVComponentMethods<GuiButton> for GuiButton

source§

fn set_focus(&self) -> Result<()>

This function can be used to set the focus onto an object. If a user interacts with SAP GUI, it moves the focus whenever the interaction is with a new object. Interacting with an object through the scripting component does not change the focus. There are some cases in which the SAP application explicitly checks for the focus and behaves differently depending on the focused object.
source§

fn visualize(&self, on: bool) -> Result<()>

Calling this method of a component will display a red frame around the specified component if the parameter on is true. The frame will be removed if on is false. Some components such as GuiCtrlGridView support displaying the frame around inner objects, such as cells. The format of the innerObject string is the same as for the dumpState method.
source§

fn acc_text(&self) -> Result<String>

An additional text for accessibility support.
source§

fn acc_text_on_request(&self) -> Result<String>

An additional text for accessibility support.
source§

fn acc_tooltip(&self) -> Result<String>

An additional tooltip text for accessibility support.
source§

fn changeable(&self) -> Result<bool>

An object is changeable if it is neither disabled nor read-only.
source§

fn default_tooltip(&self) -> Result<String>

Tooltip text generated from the short text defined in the data dictionary for the given screen element type.
source§

fn height(&self) -> Result<i64>

Height of the component in pixels.
source§

fn icon_name(&self) -> Result<String>

If the object has been assigned an icon, then this property is the name of the icon, otherwise it is an empty string.
source§

fn is_symbol_font(&self) -> Result<bool>

The property is TRUE if the component’s text is visualized in the SAP symbol font.
source§

fn left(&self) -> Result<i64>

Left position of the element in screen coordinates
source§

fn modified(&self) -> Result<bool>

An object is modified if its state has been changed by the user and this change has not yet been sent to the SAP system.
source§

fn parent_frame(&self) -> Result<GuiComponent>

If the control is hosted by the Frame object, the value of the property is this frame. Overwise NULL.
source§

fn screen_left(&self) -> Result<i64>

The y position of the component in screen coordinates.
source§

fn screen_top(&self) -> Result<i64>

The x position of the component in screen coordinates.
source§

fn text(&self) -> Result<String>

The value of this property very much depends on the type of the object on which it is called. This is obvious for text fields or menu items. On the other hand this property is empty for toolbar buttons and is the class id for shells. You can read the text property of a label, but you can’t change it, whereas you can only set the text property of a password field, but not read it.
source§

fn set_text<S>(&self, value: S) -> Result<()>where S: AsRef<str>,

The value of this property very much depends on the type of the object on which it is called. This is obvious for text fields or menu items. On the other hand this property is empty for toolbar buttons and is the class id for shells. You can read the text property of a label, but you can’t change it, whereas you can only set the text property of a password field, but not read it.
source§

fn tooltip(&self) -> Result<String>

The tooltip contains a text which is designed to help a user understand the meaning of a given text field or button.
source§

fn top(&self) -> Result<i64>

Top coordinate of the element in screen coordinates.
source§

fn width(&self) -> Result<i64>

Width of the component in pixels.
source§

impl HasDispatch<GuiButton> for GuiButton

source§

fn get_idispatch(&self) -> &IDispatch

Get the IDispatch object for low-level access to this component.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.