화면 » Api
  
createobject
  
Description
오브젝트를 동적으로 생성하는 API이다.
파라미터 strStyleID는 옵션 파라미터로 스타일을 지정할 경우 값을 전달하고
불필요할 경우 값을 주지 않으면된다.
  
  
Parameters
  
    
      | Parameters | 
      Type | 
      Description | 
    
  
  
        
    
        | nObjectKind | 
        short | 
 	생성할 오브젝트 종류 | 
      
    
    
        | nLeft | 
        long | 
 	생성될 X좌표 | 
      
    
    
        | nTop | 
        long | 
 	생성될 Y좌표 | 
      
    
    
        | nWidth | 
        long | 
 	생성될 넓이 | 
      
    
    
        | nHeight | 
        long | 
 	생성될 넓이 | 
      
    
    
        | strStyleID | 
        STRING | 
 	스타일 아이디 [옵션] | 
      
  
  
Return Value
  
    
      | Type | 
      Description | 
    
  
  
    
      | INSTANCE | 
      생성된 오브젝의 Instance | 
    
  
Remark
** nObjectKind 상수값
XFD_CTRLKIND_FIELD_NORMAL = 100
XFD_CTRLKIND_FIELD_NUMERIC = 101
XFD_CTRLKIND_FIELD_HANGUL = 102
XFD_CTRLKIND_FIELD_PASSWORD = 103
이외의 nObjectKind 상수값은 getcontrolkind 함수의 도움말을 참조한다.
  
 
  
Example
function btnImageCreate(objInst, nXPoint, nYPoint, nWinXPoint, nWinYPoint)
{
	var instNewObj = screen.createobject(XFD_CTRLKIND_IMAGE, 0, 0, 100, 100);
	if(instNewObj != null) {
		factory.consoleprint("-->> create success");
	} else {
		factory.consoleprint("-->> create fail..");
	}
}
  
See Also
createshape
  
Viewer Ver.
9.1.1.1
  
Update Date
 20190729