Skip to content

AddImage Method

Description

Adds an Image object that can then be used to load an image file.

Syntax

Public Function AddImage() As [FlowGraphImage](XtremeFlowGraph~FlowGraphImage.md)

Return Type

Reference to the FlowGraphImage that was just added.

Remarks

AddImage must first be used to create a FlowGraphImage. You can use this object to load an image file.

Example

Loads an image and displays it in the node.

Dim Image As FlowGraphImage  
Set Image = FlowGraph.Images.AddImage  
Image.LoadFromFile App.Path & "\Images\NodeImageCustomers.bmp"  

Set Image = FlowGraph.Images.AddImage  
Image.LoadFromFile App.Path & "\Images\NodeImageOrderDetails.png"

FlowGraph.Pages.RemoveAll  

Dim Page As FlowGraphPage  
Set Page = FlowGraph.Pages.AddPage  

Debug.Print FlowGraph.Pages.Count  

Set FlowGraph.ActivePage = Page  

Dim pTableCustomers As FlowGraphNode  
Set pTableCustomers = Page.Nodes.AddNode

pTableCustomers.Caption = "Customers"  
pTableCustomers.Tooltip = "Customers Table"  
pTableCustomers.Color = RGB(155, 187, 89)  
pTableCustomers.LocationX = 820  
pTableCustomers.LocationY = 360  
pTableCustomers.ImageIndex = 0  
pTableCustomers.Locked = True

See Also

FlowGraphImages Collection


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.