Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PosNameTypeDescription
<1, 1>HandleIntegerThe windows handle to the control to add, returned from its HANDLE property
<1, 2>XIntegerThe control's x position in the panel
<1, 3>YIntegerThe control's y position in the panel
<1, 4>WidthIntegerThe control's width in the panel
<1, 5>HeightIntegerThe control's height in the panel
<1, 6>ColorColorThe control's text color
<1, 7>BackgroundColorThe control's background color

The first value for each field is the windows handle (HWND) to the control, is you can get by getting the control's HANDLE property.

...

Don't use the Form Designer to set the control's text color colors if you plan to put it into a Panel control. It won't stick. There are technical reasons for this, but the easiest work around is to pass the desired color foreground and background colors into this method.

Example

Code Block
CtrlArray = "" 

// Add the label, placing it in the same place it was added to the form 
hWnd = Get_Property(@Window:".LABEL", "HANDLE") 
OrigSize = Get_Property(@Window:".LABEL", "ORIG_SIZE")
Convert @FM to @VM in OrigSize 
CtrlArray<-1> = hWnd:@VM:OrigSize 

// Add the editline, placing it in the same place it was added to the form 
hWnd = Get_Property(@Window:".EDITLINE", "HANDLE") 
OrigSize = Get_Property(@Window:".EDITLINE", "ORIG_SIZE")
Convert @FM to @VM in OrigSize 
CtrlArray<-1> = hWnd:@VM:OrigSize 

// Add the controls 
Send_Message(@Window:".OLE_PANEL", "OLE.AddCtrls", CtrlArray)

...