我弄了个控件,然后创建了这个控件的组,现在想在这个控件里再加控件组,请问用LOAD创建控件如何指定它的容器,
我弄的控件,差不多就是个PICTURE 是可以作容器用的, 我现在要往里边加一些图片和按钮,当然还要写成组,用CONTROLS.ADD 是可以,不过不能成组,我想问如果用LOAD能不能把它们设计到容器里.
一百分

解决方案 »

  1.   

    Load xpsoul01(xpsoul01.Count)
    With xpsoul01(xpsoul01.Count - 1)
          .Height = 735
          .Left = 100 * (xpsoul01.Count - 1 + 1)
          .Top = 300 * (xpsoul01.Count - 1 + 1)
          .Width = 2895
          .Visible = True
          .Caption = "窗口:" & (xpsoul01.Count - 1) & "号"
    End WithLoad btninfos(btninfos.Count)
    With btninfos(btninfos.Count - 1)
        .Visible = True
        .Top = 50
        .Left = 50
        .Height = 100
        .Width = 200
        .Caption = "详细信息"
    End With
    就象这样,按钮如何填到上面的容器里
      

  2.   

    Load btninfos(btninfos.Count)
    With btninfos(btninfos.Count - 1)
        .Visible = True
        .Top = 50
        .Left = 50
        .Height = 100
        .Width = 200
        .Caption = "详细信息"
        Set .Container = xpsoul01(xpsoul01.Count - 1)
    End With
      

  3.   

    可以:
    set 控件名(索引).Container=容器控件的名称
    控件名(索引).Visible = True
    控件名(索引).Move 100, 100类似这样即可