I’m trying to create several dynamic controls with in a Webcontainer.
The Code takes an object that has been already created on the Webcontainer ( by dragging and dropping from the IDE), and then tries to copy that object x number of times.
The Code works, kinda sort of, it only duplicates the object once.
The object is a ‘Super’ of the webimageview class
any idea on what I’m doing wrong??? Other than it doesn’t work
I’m on 2012 R2.1
Thanks to all who help!
if session.opend = false then //opend is a method in session, that connects to a DB
//TODO: display error
elseif Session.opend = true then
session.SQL = "SELECT Test.menuName, Test.menuPKI FROM test"
session.rs = session.db.SQLSelect(session.SQL) // "rs" property in session of Recordset
//TODO: db error checking
dim x as integer // to shift Dynamic control left by 112
x = 9 // start with 9
for i as integer = 0 to session.rs.RecordCount
if session.rs.EOF() then //EOF = true , exit out
return
end
msgbox(session.rs.Field("menuName")) //Msgbox Display's the field correctly on every pass
// ----- Code below; Trying to duplicate an already existing object in the WebContainer --
//----- Only displays the object, once
// ----- Tried the code with a normal webimageview, same results
dim dynamicControl as new myImageviewClass
dynamicControl = myImageviewClass1
dynamicControl.Left = x
dynamicControl.top = 32
dynamicControl.Visible = true
dynamicControl.Enabled = true
x = x + 112 //shifting by 112 every iteration of the FOR/NEXT
session.rs.MoveNext
next
end