Article Details
Id: | 12527 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 2.02.04 |
Opened: | 19/12/2014 |
Closed: | 19/12/2014 |
Released: | 13/02/2015 |
Job: | J014688 |
Page Sets; HTML Panel enhancements
HTML Panel type Page Objects have been enhanced with a new 'ShowBorder' property.
In addition, a new GetIconAsPngBase64String method has been added to finUtilities to get a finPOWER Connect icon as a base-64 encoded PNG string for inclusion in HTML.
The following code sample demonstrates this function within a Page Set with a Page Object named htmlPanel1:
Public Overrides Function Initialise() As Boolean
' Assume Success
Initialise = True
' Initialise
mReports = DirectCast(psh.Reports, ISfinReports)
mUI = DirectCast(psh.UserInterface, ISUserInterfaceBL)
' Set HTML
htmlPanel1_Refresh()
End Function
Private Sub htmlPanel1_Refresh()
Dim sb As StringBuilder
' Initialise
sb = New StringBuilder()
' Create HTML
' NOTE: CSS can be used to set background to Windows system colours (http://webdesign.about.com/od/colorcharts/l/blsystemcolors.htm)
sb.AppendLine("<!DOCTYPE html>")
sb.AppendLine("<html style='overflow:hidden'>")
sb.AppendLine("<body style='padding:0; margin:0; background-color:ButtonFace'>")
sb.Append("<table border='0' cellpadding='0' cellspacing='0'>")
sb.Append("<tr>")
sb.Append("<td style='padding-right:8px'>")
sb.Append("<img src='data:image/gif;base64," & finBL.Utilities.GetIconAsPngBase64String("Account", 32, "Warning") & "' width='32' height='32'/>")
sb.Append("</td>")
sb.Append("<td>")
sb.Append("<div style='font:16pt Segoe UI; font-weight:bold; color:#3399FF'>My Heading</div>")
sb.Append("<div style='font:9pt Segoe UI'>Other text below the heading</div>")
sb.Append("</td>")
sb.Append("</tr>")
sb.Append("</table>")
sb.AppendLine("</body>")
sb.AppendLine("</html>")
' Update HTML
htmlPanel1.Text = sb.ToString()
End Sub