BBjAppConfig::setStyleSheet

Description

In BBj 12.00 and higher, this method sets a custom style sheet with the CSS file represented by BBjResourceUrl.

Syntax

Return Value

Method

void

setStyleSheet(BBjResourceUrl url)

Parameters

Variable

Description

url

A URL for the application's style sheet, or null to clear the associated style sheet.

Return Values

None.

Example

Click here to download a zip file containing the required files to run this sample


rem ' BBjAppConfig::setStyleSheet
app$ = "buisample"
admin! = bbjapi().getAdmin("admin","admin123")
appServer! = admin!.getWebAppServer()
appConfig! = appServer!.makeEmptyAppConfig()
css! = fnStaticResource!(dsk("")+dir("")+app$+".css","text/css")
appConfig!.setStyleSheet(css!)
print "setStyleSheet: ",appConfig!.getStyleSheet()
stop
def fnStaticResource!(filename$,mimetype$)
  iterator! = appServer!.getStaticResources().iterator()
  while iterator!.hasNext()
    resource! = iterator!.next()
    if resource!.getSourceFileName()<>filename$ then continue
    if resource!.getMimeType()<>mimetype$ then continue
    resource!.setSourceFileName(filename$)
    return resource!
  wend
  return appServer!.addStaticResource(filename$,mimetype$)
fnend

See Also

BBjAPI

BBjAppConfig

BBjAppConfig::getStyleSheet

BBjAppServer

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.