1 using System;
2 using MyGUI.Managed;
3 
4 namespace TestApp.Managed
5 {
6     public class Test_ImageBox
7     {
Test()8         public static void Test()
9         {
10             ImageBox image = Gui.Instance.CreateWidget<ImageBox>("ImageBox", new IntCoord(320, 120, 100, 100), Align.Default, "Main");
11 
12             image.SetItemResource("pic_CoreMessageIcon");
13             image.SetItemGroup("Icons");
14             image.SetItemName("Warning");
15 
16             image = Gui.Instance.CreateWidget<ImageBox>("ImageBox", new IntCoord(320, 20, 100, 100), Align.Default, "Main");
17             image.SetImageTexture("core.png");
18             image.SetImageCoord(new IntCoord(0, 0, 1024, 256));
19             image.SetImageTile(new IntSize(100, 100));
20             image.ImageIndex = 1;
21         }
22     }
23 }
24