This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
SET WINDOW DOCUMENT ICON
|
SET WINDOW DOCUMENT ICON ( winRef {; image}{; file} ) | ||||||||
Parameter | Type | Description | ||||||
winRef | Integer |
![]() |
Window reference number | |||||
image | Picture |
![]() |
Custom icon | |||||
file | 4D.File, 4D.Folder |
![]() |
File path or folder path | |||||
The SET WINDOW DOCUMENT ICON command allows you to define an icon for windows in multi-window applications using either an image and/or file with the window reference winRef. The icon will be visible within the window itself and on the windows taskbar to help users identify and navigate different windows.
In this example, we want to create four windows:
var $winRef : Integer
var $userImage : Picture
var $file : 4D.File
// 1- Open "Contact" form
$winRef:=Open form window("Contact";Plain form window+Form has no menu bar)
SET WINDOW DOCUMENT ICON($winRef)
DIALOG("Contact";*)
// 2- Open "Contact" form with "user" icon
$winRef:=Open form window("Contact";Plain form window+Form has no menu bar)
BLOB TO PICTURE(File("/RESOURCES/icon/user.png").getContent();$userImage)
SET WINDOW DOCUMENT ICON($winRef;$userImage)
DIALOG("Contact";*)
// 3- Open "Contact" form associated with the document "user"
$winRef:=Open form window("Contact";Plain form window+Form has no menu bar)
$file:=File("/RESOURCES/files/user.txt")
SET WINDOW DOCUMENT ICON($winRef;$file)
DIALOG("Contact";*)
// 4- Open "Contact" form associated with the document "user" with "user" icon
$winRef:=Open form window("Contact";Plain form window+Form has no menu bar)
BLOB TO PICTURE(File("/RESOURCES/icon/user.png").getContent();$userImage)
$file:=File("/RESOURCES/files/user.txt")
SET WINDOW DOCUMENT ICON($winRef;$userImage;$file)
DIALOG("Contact";*)
Product: 4D
Theme: Windows
Number:
1840
Created: 4D v20 R7
4D Language Reference ( 4D v20 R7)