PyLineEdit#

class ansys.aedt.toolkits.common.ui.utils.widgets.py_line_edit.py_line_edit.PyLineEdit(text='', place_holder_text='', radius=8, border_size=2, color='#FFF', selection_color='#FFF', bg_color='#333', bg_color_active='#222', context_color='#00ABE8')[source]#

Custom QLineEdit widget with enhanced styling.

Parameters:
textstr, optional

The initial text for the line edit. Default is an empty string.

place_holder_textstr, optional

The placeholder text to be displayed when the line edit is empty. Default is an empty string.

radiusint, optional

The border radius of the line edit. Default is 8.

border_sizeint, optional

The border size of the line edit. Default is 2.

colorstr, optional

The text color of the line edit. Default is “#FFF” (white).

selection_colorstr, optional

The text selection color of the line edit. Default is “#FFF” (white).

bg_colorstr, optional

The background color of the line edit. Default is “#333” (dark gray).

bg_color_activestr, optional

The background color of the line edit when active. Default is “#222” (darker gray).

context_colorstr, optional

The color representing a context or active state. Default is “#00ABE8” (blue).

set_stylesheet(radius, border_size, color, selection_color, bg_color, bg_color_active, context_color)[source]#

Set the stylesheet for the PyLineEdit.

Parameters:
radiusint

Border radius of the line edit.

border_sizeint

Border size of the line edit.

colorstr

Text color of the line edit.

selection_colorstr

Text selection color of the line edit.

bg_colorstr

Background color of the line edit.

bg_color_activestr

Background color when the line edit is active.

context_colorstr

Color representing a context or active state.