Table of Contents

 
PlaceButton
 

Purpose

Moves a button to a new location

 

Protoype

void CButtonMngr::PlaceButton (string str_button, int i_xpos, int i_ypos, bool b_center = false)
 

Parameters

button the ID of the button object to place
xpos the new X position
ypos the new Y position
center whether to center the button around the coordinates (TRUE) or not (FALSE)
 

Description

This function places button objects at the coordinates given. So if a button object is located at (100, 200) and you pass in i_xpos and i_ypos values of 50 and 50, the new location of the text object will be (50, 50). If you want to center the button object around the coordinates (instead of having it's upper-left corner placed there) then you can pass in TRUE for b_center.

 

Use

CButtonMngr button;
// place and center a button object
button.PlaceButton("my_button", 50, 50, true);
 

Prev: MoveButton
Next: RemoveAll