is it possible to save shape color in a file (txt, ini, inc) ?
Professional Software Development Tools
is it possible to save shape color in a file (txt, ini, inc) ?
im not sure i understand what your wanting to do this for but if you must then youll have to set the value you want manually as their is no way to actually retrieve the shapes color.
So lets say you want your shape to be filled with red [which is 255] then youd set a variable which we'll call scolor to 255. Then set the fillcolor for the shape [which we'll call shape1] to the var, and finally output the variable to an inifile. A small example is below. Hope it helps
Code:sColor = 255 Shape.SetFillColor("Shape1", sColor); INIFile.SetValue("AutoPlay\\Docs\\Settings.ini", "Shape1", "Color", sColor);
p.s.
a more practical use would be to set the scolor variable with a dialog.input or perhaps a input object.
Last edited by TimeSurfer; 04-23-2008 at 06:22 AM.
@TimeSurfer
i want to save color of the shape for next time use...
look at the example please...
i gotcha here is a revised copy of your apz. You'll notice i added 1 line to your label code [at the bottom] and added a line in page preload and a conditional statement in page on show.![]()
thanks alot TimeSurfer![]()
why can i not set pluging invisible ? if no color make it invisible...
Code:if scolor ~= nil then Shape.SetFillColor("Plugin1", scolor); else Shape.SetVisible("Plugin1", false) end
isnt that correct ? if no color make it invisible...
Code:if scolor ~= nil then Shape.SetFillColor("Plugin1", scolor); else Plugin.SetVisible("Plugin1", false); end
yes your correct, problem is that scolor is set by the inifile. if the inifile were empty it would work or if the color value in the ini was blank it would work.
TimeSurfer
when i click cancel on color dialog i get an error !!! with ur last example
when i click cancel on color dialog shape goes black color and i get that error...
it has something to do with the chcolor.dll give me a few ill try to have a solution for you.