WebListBoxStyleRenderer
From Xojo Documentation
New in 2020r1
Allows WebStyles to be used on cells in a WebListBox.
Properties | |
|
Constructors | |
|
Notes
If you indicate a font in the WebStyle, it must be available to the user's browser. That means it must be:
- Installed in the browser
- Installed on the device
- Downloaded at runtime
To download fonts at runtime, you must include a URL for the font in the WebApplication.HTMLHeader property. This can be done in the IDE via the Inspector. Google one of several places where you can find fonts that can be used freely. There you can choose fonts and get a URL for embedding the fonts at runtime in your application.
Applied WebStyles affect the entire row. If you want the style to affect a specific cell, set the CellOnly property to True.
Sample Code
This example in the Opening event of a WebListBox adds a blank row, creates a WebStyle, adds it to the WebListBoxStyleRenderer along with some sample text and then assigns it to the cell of the WebListBox:
Me.AddRow("")
'Create a webstyle
Var style As New WebStyle
style.BackgroundColor = Color.Yellow
style.BorderColor = Color.Green
style.BorderThickness = 3
Style.Bold = True
'Create a renderer from the webstyle and some text
Var cellRenderer As New WebListBoxStyleRenderer(style, "Hello World!")
'Assign the renderer to the cell
Me.CellValueAt(0,0) = cellRenderer
Compatibility
Web projects on all supported operating systems.
See Also
WebListBox control; WebStyle, WebListBoxCellRenderer, WebListBoxImageRenderer, and WebListBoxDateTimeRenderer classes.