@Aylin, This is what I needed. I just put a CEImage with an orange square on the form and added a few lines of code
Code:
for x = 0, 31 do
UDF1['CEImage'..1+x].OnClick = function(sender)
UDF1.CEImage65.setPosition(UDF1['CEImage'..1+x].Left-8, UDF1['CEImage'..1+x].Top-8)
end
end
@Corroder, This example suits me too.
One more question. How to change the color of an object without RGB?
Code:
UDF1.CEPanel1.Color = 0xff0000 --code works
UDF1.CEPanel1.Color = clMenuBar --does not work with OnClick
UDF1.CEPanel1.Color = clDefault --does not work with OnClick
I want to get the same color that is created by default on the form.
I want to get the same color that is created by default on the form.
Put under onClick function.
option 1 :
1. make a new CEPanel (Don't change the color of this CEPanel, leave it as default color) -- say this : CEPanel1
2. set this CEPanel1.visible = false (hide somewhere on UDF1)
3. Now, to get other CEPanel color same with CEPanel1 color :
Code:
UDF1.CEPanel1.visible = false
function chgColor()
defaultclr = UDF1.CEPanel1.getColor()
UDF1.CEPanel2.Color = defaultclr ---- and other CEPanel..xx
end
UDF1.show()
UDF1.CEPanel1.onClick = chgColor
or
Code:
UDF1.CEPanel2.Color = UDF1.CEPanel1.Color
Option 2 :
You can directly change CEPanel color using free pascal color code.
e.q : clBlack = $000000 in free pascal or = 0x000000 in hexadecimal code (able to use in CE)
Complete standard free pascal color code list, see link below :
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum