HtmlText Module
- class epyk.core.html.HtmlText.BlockQuote(page: PageModel, text, author, color, width, height, html_code, helper, options, profile)
- class epyk.core.html.HtmlText.Fieldset(page: PageModel, legend: str, width: str, height: str, helper: Optional[str], options: Optional[dict], profile: Optional[Union[bool, dict]])
- property options: OptionsText
Property to the component options.
Options can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- class epyk.core.html.HtmlText.Highlights(page: PageModel, text, title, icon, type, color, width, height, html_code, helper, options, profile)
- property options: OptionsHighlights
Property to set all the possible object for a button.
- class epyk.core.html.HtmlText.Label(page: PageModel, text: Optional[str] = None, color: Optional[str] = None, align: Optional[str] = None, width=None, height=None, html_code: Optional[str] = None, tooltip: Optional[str] = None, profile=None, options=None)
Label component.
- click(js_funcs: Union[list, str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event for a component.
The event will be automatically added to the onload section to be activated once the component. has been build.
Usage:
select.label.click(str(page.js.console.log("test")))
Related Pages:
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- Returns:
The component for the chaining.
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript available for a DOM element by default.
Usage:
div = page.ui.label(htmlCode="testDiv") print(div.dom.content)
- Returns:
A Javascript Dom object.
- property id_html: JsDoms
Get the element by id.
This will return a DOM object and use document.getElementById to select the component.
Related Pages:
- property options: OptionsText
Property to set all the possible object for a button.
- selectable(flag: bool = False)
Make the label component not selectable.
This will be done by adding the class CssTextNotSelectable to the component.
- Parameters:
flag – Optional. Set the text not selectable.
- Returns:
self to allow the chains
- class epyk.core.html.HtmlText.Numeric(page: PageModel, number, title, label, icon, color, tooltip, html_code, options, helper, width, profile)
Numeric component.
- click(js_funcs: Union[list, str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event to the HTML component.
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property dom: JsHtmlNumeric
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- property js: CompNumber
Return the Javascript internal object.
- money(symbol: str = '', digit: int = 0, thousand_sep: str = '.', decimal_sep: str = ',', fmt: str = '%s%v')
Format any number into currency.
Related Pages:
- Parameters:
symbol – Optional. custom symbol
digit – Optional. Number of digit
thousand_sep – Optional. The thousand separator
decimal_sep – Optional. The decimal separator
fmt – Optional. Format representation for the value (%v) and currency (%s)
- number(digits: int = 0, thousand_sep: str = ',', decimal_sep: str = ',')
Format a number with custom precision and localisation.
Related Pages:
- Parameters:
digits – Optional. Number of digit
thousand_sep – Optional. The thousand separator
decimal_sep – Optional. The decimal separator
- property options: OptionsNumber
Property to the component options.
Options can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- to(number: int, timer: int = 1)
- Parameters:
number (int) –
timer (int) – The increase in millisecond
- class epyk.core.html.HtmlText.Paragraph(page: PageModel, text, color, background_color, border, width, height, html_code, encoding, helper, options, profile)
Paragraph component.
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object.
- property options: OptionsText
Property to set all the possible object for a button.
- class epyk.core.html.HtmlText.Position(page: PageModel, text='', color=None, align=None, width=None, height=None, html_code=None, tooltip=None, options=None, profile=None)
Position component (Span for Number)
- digits(flag: bool = False)
Specify if the count should be done from the commas.
- Parameters:
flag – Boolean (default false)
- position(index: int, style: dict)
Set the CSS format for a specific character at a given position.
- Parameters:
index – A number
style – The CSS Style to be used
- class epyk.core.html.HtmlText.Pre(page: PageModel, vals, color, width, height, html_code, options, helper, profile)
Pre-formatted text component.
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- property options: OptionsText
Property to set all the possible object for a button.
- selectable(flag: bool = False)
Make the label component not selectable.
This will be done by adding the class CssTextNotSelectable to the component.
- Parameters:
flag – Optional. A flag to the set items selectable
- Returns:
self to allow the chains.
- class epyk.core.html.HtmlText.Span(page: PageModel, text='', color=None, align=None, width=None, height=None, html_code=None, tooltip=None, options=None, profile=None)
- click(js_funcs: Union[list, str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event for a component.
The event will be automatically added to the onload section to be activated once the component has been build.
Usage:
select.label.click(str(page.js.console.log("test")))
Related Pages:
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- Returns:
The HTML component.
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- property id_html
Get the element by id.
This will return a DOM object and use document.getElementById to select the component.
Related Pages:
- property options: OptionsText
Property to set all the possible object for a button.
- class epyk.core.html.HtmlText.Text(page: PageModel, text: str, color: str, align: str, width, height, html_code: str, tooltip: str, options, helper: str, profile)
Text component (based on DIV).
- click(js_funcs: Union[list, str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event on the text component.
The style of the mouse on the component will be changed to make the event more visible.
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- editable()
Change the component properties to be editable if double clicked.
Usage:
page.ui.text("This is a text").editable()
- Returns:
Self to allow the chaining.
- goto(url: str, js_funcs: Optional[Union[list, str]] = None, profile: Optional[Union[bool, dict]] = None, target: str = '_blank', source_event: Optional[str] = None, on_ready: bool = False)
Click event which redirect to another page.
- Parameters:
url – The url link
js_funcs – The Javascript Events triggered before the redirection
profile – Optional. A flag to set the component performance storage
target – Optional.
source_event – Optional. The event source
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property options: OptionsText
Property to set all the possible object for a button.
- property val
Property to get the jquery value of the HTML object in a python HTML object.
This method can be used in any jsFunction to get the value of a component in the browser. This method will only be used on the javascript side, so please do not consider it in your algorithm in Python
- Returns:
Javascript string with the function to get the current value of the component
- write(timer: int = 50)
Add a typing effect on this text.
Related Pages:
- Parameters:
timer – Optional. The speed for the typing effect
- class epyk.core.html.HtmlText.Title(page: PageModel, text, level, name, contents, color, picture, icon, marginTop, html_code, width, height, align, options, profile)
- click(js_funcs: Union[list, str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event for a component.
The event will be automatically added to the onload section to be activated once the component has been build.
Usage:
select.label.click(str(page.js.console.log("test")))
Related Pages:
- Parameters:
js_funcs – The Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The JavaScript DOM source for the event (can be a sug item)
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- Returns:
The HTML component.
- property dom: JsHtmlRich
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- property options: OptionsTitle
Property to the component options.
Options can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
- property style: ClassHtmlEmpty
Property to the CSS Style of the component.