PDA

View Full Version : Dynamic buttons


JUKEX
12-11-2008, 05:33 PM
Dynamic load buttons, do not load correct size, why?.

Page.CreateObject(OBJECT_IMAGE,"DianamicBut",nil);
Button.SetProperties("DianamicBut", {ButtonFile=ButtAddress});

reteset
12-11-2008, 05:56 PM
try it with a whole Image properties table

tblImageProps = {};
tblImageProps.ImageFile = "";
tblImageProps.Height = 150;
tblImageProps.Width = 150;
tblImageProps.Y = 0;
tblImageProps.X = 0;
tblImageProps.UseTransColor = false;
tblImageProps.TransparentColor = Math.HexColorToNumber("FFFFFF");
tblImageProps.Opacity = 100;
tblImageProps.Tolerance = 10;
tblImageProps.HitTest = HITTEST_STANDARD;
tblImageProps.Cursor = CURSOR_ARROW;
tblImageProps.TooltipText = "";
tblImageProps.Visible = true;
tblImageProps.Enabled = true;
tblImageProps.ResizeLeft = false;
tblImageProps.ResizeRight = false;
tblImageProps.ResizeTop = false;
tblImageProps.ResizeBottom = false;
tblImageProps.ClickSound = SND_NONE;
tblImageProps.ClickSoundFile = "";
tblImageProps.HighlightSound = SND_NONE;
tblImageProps.HighlightSoundFile = "";

Page.CreateObject(OBJECT_IMAGE,"DianamicBut",tblImageProps);

or try this example
http://www.indigorose.com/forums/showpost.php?p=115673&postcount=13

ShadowUK
12-12-2008, 12:39 AM
Dynamic load buttons, do not load correct size, why?.

Page.CreateObject(OBJECT_IMAGE,"DianamicBut",nil);
Button.SetProperties("DianamicBut", {ButtonFile=ButtAddress});

Don't you get it?

You created an OBJECT_IMAGE but then you tried to set properties using Button.SetProperties.

RizlaUK
12-12-2008, 08:40 AM
Page.CreateObject(OBJECT_IMAGE,"DianamicBut",nil);
Button.SetProperties("DianamicBut", {ButtonFile=ButtAddress});


Don't you get it?

lol, check your falgs!

reteset
12-12-2008, 10:29 AM
oh my God , i must sleep more :wow :wow :D


if (reteset_slept == "1 hour") then

Reteset.Sleep("5 hours");
end


first i have seen this and thought so

Page.CreateObject(OBJECT_IMAGE,"DianamicBut",nil);

Imagine Programming
12-12-2008, 10:37 AM
I know, can't sleep much either:P


Reteset.TemporalSlumber("AllNight");

JUKEX
12-17-2008, 06:53 PM
Button file (close.but):

_manifest.xml
imagebuttonup.png
imagebuttondwn.png


Size of image button 100 x 100


When reading With Page.CreateObject(OBJECT_IMAGE,"DianamicBut",{ButtonFile=ButtAddress}), does not put the size of the image.
The button properties is in _manifest.xml, ¿Is not true?, ¿Why no the load?.