I have a list of messages I want to display. This list could be long, so it needs to be scrollable. I'm using controlcreate/controlclone to create the static controls for each message. I would use a looper but I want each control to be sized to fit the message. I am currently using an internal window. I pass a data source var from the main window to a procedure in the internal window. I loop through the data source and create a control for each message. The problem is that the internal window is not scrollable unless the height of the internal window is set to more than the height of the internal window control in the editor. If I try to increase the height of the internal window each time I add a message the scrollbar does not show. Below is the code of the procedure.
nYPos is int = STC_Temp..Y
nIndex is int = 1
FOR EACH dsMessages
IW_Messages..Height += 100 // name of my internal window
ControlClone(STC_Temp,"STC_Message" + nIndex,STC_Temp..X,nYPos)
{"STC_Message"+nIndex,indControl} = dsMessages.Message
nIndex++
nYPos += 112
END
STC_Temp..Visible = False