libxlsxwriter
Data Fields
lxw_button_options Struct Reference

Options for inserted buttons. More...

Detailed Description

Options for modifying buttons inserted via worksheet_insert_button().

Examples
macro.c.

Data Fields

char * caption
 
char * macro
 
char * description
 
uint16_t width
 
uint16_t height
 
double x_scale
 
double y_scale
 
int32_t x_offset
 
int32_t y_offset
 

Field Documentation

◆ caption

char* lxw_button_options::caption

Sets the caption on the button. The default is "Button n" where n is the current number of buttons in the worksheet, including this button.

Examples
macro.c.

◆ macro

char* lxw_button_options::macro

Name of the macro to run when the button is pressed. The macro must be included with workbook_add_vba_project().

◆ description

char* lxw_button_options::description

Optional description or "Alt text" for the button. This field can be used to provide a text description of the button to help accessibility. Set to NULL to ignore the description field.

◆ width

uint16_t lxw_button_options::width

This option is used to set the width of the cell button box explicitly in pixels. The default width is 64 pixels.

◆ height

uint16_t lxw_button_options::height

This option is used to set the height of the cell button box explicitly in pixels. The default height is 20 pixels.

◆ x_scale

double lxw_button_options::x_scale

X scale of the button as a decimal.

◆ y_scale

double lxw_button_options::y_scale

Y scale of the button as a decimal.

◆ x_offset

int32_t lxw_button_options::x_offset

Offset from the left of the cell in pixels.

◆ y_offset

int32_t lxw_button_options::y_offset

Offset from the top of the cell in pixels.