XWidgetSoft Forum https://bbs.xwidget.com/ |
|
A problem with creating images via js https://bbs.xwidget.com/viewtopic.php?f=8&t=2953 |
Page 1 of 1 |
Author: | Eliont [ April 15th, 2013, 10:43 am ] | ||
Post subject: | A problem with creating images via js | ||
Hello. Please - only last image visible, other looks like second on this screen or just don't appear. Code: images[num] = Image.Clone(icon2) //images[num] = Image.Create(widget); <--- don't work. How to use this properly? I tried many variants, but nothing except upper line works. images[num].parent = frame; images[num].Visible = true; images[num].top = 10; images[num].Left = 5; images[num].core = shortcutlistcore1; images[num].Coreformat = "%item"+num+"_Icon"; images[num].OnClick = "!Open"; images[num].OnMouseEnter = "OnMouseEnter"; images[num].OnMouseLeave = "OnMouseLeave"; And has xwidget a manual like http://docs.python.org/2/library/ ? Thanks in advance.
|
Author: | Tony [ April 15th, 2013, 4:10 pm ] |
Post subject: | Re: A problem with creating images via js |
How to create image with js code: Code: var newImg = Image.Create(widget);
widget.InitControl(newImg); //uses this function to init control newImg.parent = root; newImg.src = "Icon.png"; newImg.left = 50; newImg.top = 100; newImg.width = 200; newImg.height = 200; newImg.OnClick = "open1"; // newImg.bringtofront; //if you need bring image to front |
Author: | Eliont [ April 15th, 2013, 6:10 pm ] |
Post subject: | Re: A problem with creating images via js |
Thank you, it works. Code: var newImg = Image.Create(widget); widget.InitControl(newImg); //uses this function to init control newImg.parent = frame; newImg.core = shortcutlistcore1; newImg.Coreformat = "%item"+num+"_Icon"; newImg.top = 10; newImg.Left = 5; newImg.width = 45; newImg.height = 45; newImg.WrapMode = 3; newImg.OnClick = "!Open"; newImg.bringtofront; //if you need bring image to front |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |