<long post - sorry>
I have stripped this pretty much to essentials - here is the code for the
classes (the same thing happens if I use .vcx's)
If I open membersMultiClass in the class designer the Properties show a
correct controlcount.
You can find the original code and Les Pinter's article at:
http://www.utmag.com/wconnect/wc.dll?9,7,10,608

* open this program in the debugger
* put 'this' in the Watch window (no quotes)
* step (F8) thru code - after 'FOR EACH...' open Watch window
* open up Parent - note controlcount=1
* all the controls/ objects are there but not in their collections
*********************
* Testing Code:
ctheclass='membersMultiClass'
oB = CREATEOBJECT(ctheclass)
RETURN

**************************************************
*-- Class:        multiline
*-- ParentClass:  container
*-- BaseClass:    container
*
DEFINE CLASS multiline AS container
   Width = 682
   Height = 63
   BorderWidth = 0
   Name = "multiline"

   ADD OBJECT cmdedit AS commandbutton WITH ;
      Top = 28, ;
      Left = 0, ;
      Height = 23, ;
      Width = 47, ;
      Caption = "\<Edit", ;
      Name = "cmdEdit"

   PROCEDURE cmdedit.Init
      FOR EACH Ctrl IN THIS.PARENT.CONTROLS
         IF NOT Ctrl.CLASS $ [Label|Line|Shape|Image|Commandbutton]
            Ctrl.CONTROLSOURCE = []
            IF ALINES(aL,Ctrl.TAG,13,[<controlsource=],[<rowsource=],[>]) >
1 && <a.f.d>
               Ctrl.ROWSOURCE = []  && <a.f.d>
            ENDIF
            Ctrl.ENABLED = .F.
         ENDIF
      ENDFOR
   ENDPROC
ENDDEFINE
*
*-- EndDefine: multiline
**************************************************

**************************************************
*-- Class:        membersmulticlass
*-- ParentClass:  multiline
*-- BaseClass:    container
*-- Time Stamp:   11/22/06 09:27:08 AM
*
DEFINE CLASS membersmulticlass AS multiline
   Width = 740
   Height = 140
   Name = "membersmulticlass"
   cmdEdit.Top = 36
   cmdEdit.Left = 4
   cmdEdit.Name = "cmdEdit"

   ADD OBJECT txtrole AS textbox WITH ;
      Comment = "", ;
      Tag = "<controlsource=curMembers.role>", ;
      Height = 23, ;
      Left = 4, ;
      MaxLength = 5, ;
      TabIndex = 7, ;
      Top = 82, ;
      Width = 56, ;
      Name = "txtRole"

   ADD OBJECT lblrole AS label WITH ;
      AutoSize = .T., ;
      WordWrap = .T., ;
      BackStyle = 0, ;
      Caption = "Role", ;
      Left = 24, ;
      Top = 66, ;
      Width = 26, ;
      TabIndex = 6, ;
      Name = "lblRole"

   ADD OBJECT txtalias AS textbox WITH ;
      Comment = "", ;
      Tag = "<controlsource=curMembers.alias>", ;
      Format = "F", ;
      Height = 23, ;
      Left = 512, ;
      MaxLength = 127, ;
      TabIndex = 13, ;
      Top = 16, ;
      Width = 220, ;
      Name = "txtAlias"

   ADD OBJECT lblalias AS label WITH ;
      AutoSize = .T., ;
      WordWrap = .T., ;
      BackStyle = 0, ;
      Caption = "Alias", ;
      Left = 512, ;
      Top = 2, ;
      Width = 27, ;
      TabIndex = 12, ;
      Name = "lblAlias"

   ADD OBJECT lblschool AS label WITH ;
      AutoSize = .T., ;
      WordWrap = .T., ;
      BackStyle = 0, ;
      Caption = "School", ;
      Left = 64, ;
      Top = 90, ;
      Width = 38, ;
      TabIndex = 21, ;
      Name = "lblSchool"

   ADD OBJECT cmboschool AS combobox WITH ;
      Tag = "<controlsource=curMembers.school><rowsource=curSchools_lu>", ;
      BoundColumn = 2, ;
      RowSourceType = 2, ;
      RowSource = "''", ;
      Height = 23, ;
      Left = 64, ;
      Style = 2, ;
      Top = 106, ;
      Width = 372, ;
      Name = "CmboSchool"

ENDDEFINE
*
*-- EndDefine: membersmulticlass
**************************************************

Andrew Davies  MBCS CITP
  - AndyD        8-)#


**********************************************************************

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

Please contact [EMAIL PROTECTED] with any queries.

**********************************************************************



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to