BBjAppConfig::setApplicationIcon

Description

In BBj 12.0 and higher, this method sets the icon to appear in the browser tab beside the application name.

Syntax

Return Value

Method

void

setApplicationIcon(BBjResourceUrl url)

Parameters

Variable

Description

url

A BBjResourceUrl for the application's icon, or null to clear the icon.

Return Values

None.

Remarks

None.

Example

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


rem ' BBjAppConfig::setApplicationIcon

app$ = "buisample"

admin! = bbjapi().getAdmin("admin","admin123")

appServer! = admin!.getWebAppServer()

appConfig! = appServer!.makeEmptyAppConfig()

icon! = fnStaticResource!(dsk("")+dir("")+app$+"icon.jpg","image/jpeg")

appConfig!.setApplicationIcon(icon!)

print "setApplicationIcon: ",appConfig!.getApplicationIcon()

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::getApplicationIcon

BBjAppServer

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