|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Aug 11, 2011 3:35 pm Post subject: Changing only height or only width |
|
|
Code: |
function control_setWidth(control, NewWidth)
OldWidth,OldHeight = control_getSize(control)
control_setSize(control, NewWidth, OldHeight)
end
function control_setHeight(control, NewHeight)
OldWidth,OldHeight = control_getSize(control)
control_setSize(control, OldWidth, NewHeight)
end
-- update form size
function ItemsCountChanged(itemsForm,itemscount)
if (itemscount > 10) then
form_new_height = 140 + (itemscount - 10) * (10 + 4)
--
-- 10 - height of label, 4 - border spacing
control_setHeight(itemsForm, form_new_height)
end
---
--- rest of code (placing labels, etc.)
---
end
|
Why? Because we can't use something like this:
control_setSize(control, NewWidth, -1) - to change only width
control_setSize(control, -1, NewHeight) - to change only height
_________________
|
|
Back to top |
|
|
hack0535 Cheater Reputation: 2
Joined: 16 Oct 2011 Posts: 28
|
Posted: Thu Jan 19, 2012 1:01 am Post subject: |
|
|
Try this!!
width, height = control_getSize(control)
control_setSize(control, width -1, height ) - to change only width
control_setSize(control, width, height - 1) - to change only height
|
|
Back to top |
|
|
|
|
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
|
|