create:group 
Author Message
 create:group

I've been trying to group a bunch of controls together that are created at
runtime.  Whenever I create a group control and then use it as the parent
for the strings and checkboxes, etc. I am unable to see most of the controls
being created.  It is as if they were somehow behind the group.  If I change
the parent to the window and skip creating the group, all the controls are
created fine.

Is there some property I need to use to assure each child control is going
to be visible and usable?

Thanks.

Larry



Sat, 21 May 2005 11:16:28 GMT  
 create:group
You must Unhide each created control explicitely.

Ronald
Compad



Sat, 21 May 2005 18:52:44 GMT  
 create:group
Yes.  I have the unhide command for each new control.  Still they remain
invisible.


Sat, 21 May 2005 23:32:44 GMT  
 create:group
Then issue a DISPLAY or use the ?FEQ{PROP:Hide} = False equivalent and don't
worry about the DISPLAY statement.

--
Russ Eggen
www.radfusion.com


Yes.  I have the unhide command for each new control.  Still they remain
invisible.



Sun, 22 May 2005 00:52:15 GMT  
 create:group
Why are they visible if I don't create the group?


Sun, 22 May 2005 01:02:35 GMT  
 create:group
Hi Larry,

Quote:

>Is there some property I need to use to assure each child control is going
>to be visible and usable?

Try Prop:Trn on the group structure itself.  That will make it
transparent and you should see your other controls.  Also try
Prop:Follows to change the order of the controls - not sure if that
will make a difference though...

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

ICQ:  113314380

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Sun, 22 May 2005 01:35:25 GMT  
 create:group
Thanks for the idea, Arnr.

Unfortunately it didn't change anything either.  I'm really stumped on this
{*filter*}.



Sun, 22 May 2005 02:57:10 GMT  
 create:group
Hi Larry,

Quote:

>Unfortunately it didn't change anything either.  I'm really stumped on this
>{*filter*}.

Post the code here and we'll take a look...  This doesn't make sense!
I may have some time today to play with this...

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

ICQ:  113314380

Subscribe to information from Icetips.com:
http://www.*-*-*.com/



Sun, 22 May 2005 03:37:33 GMT  
 create:group
There are two routine below that get called.  One builds the groupbox and it
gets called once for the group.  The other routine gets called for each
control within the group.

Thanks for having a look.

BuildGroupBox                    Routine

   If RC:BoxX                 = 0                  !if the X is not set
      FormX                   = 3                  ! default it to position
3
   else                                            !else
      FormX                   = RC:BoxX            ! use the value in the RC
record
   end !if

   If RC:GroupWidth           = 0                  !if the box width is not
set
      RC:GroupWidth           = 1                  ! default it to width 1
(full width)
   end !if

   If RC:BoxHeight            = 0                  !if box height is not set
      FormHeight              = 300                ! set it high for now,
adjust it later
   else                                            !otherwise
      FormHeight              = RC:BoxHeight       ! set it to the value in
RC
   end !if

   Case RC:GroupWidth                              !check the box width
field for box width option
      of 1
         FormWidth            = 438                !box is full width
      of 2
         FormWidth            = 219                !box is half width
      of 3
         FormWidth            = 146                !box is one third width
      else
         FormWidth            = 438                !anything else is going
to be full width
   end !case

   Create(FormFEQ,Create:Group)                    !  create the box

   FormFEQ{PROP:XPos}         = FormX              !  set the X
   FormFEQ{PROP:YPos}         = FormY              !  set the Y
   FormFEQ{PROP:Width}        = FormWidth          !  set the width
   FormFEQ{PROP:Height}       = FormHeight         !  set the height
   FormFEQ{PROP:Text}         = RC:ReviewCriteriaSection
   FormFEQ{PROP:Boxed}        = True               !  put a box around it
   FormFEQ{PROP:Trn}          = True               !  make sure the controls
can be seen
   FormFEQ{PROP:Scroll}       = True               !  make it scroll
   Unhide(FormFEQ)                                 !  make it visible

   FormX                      += 3                 !adjust the offset of x
to be right of line for next control
   FormY                      += FormYadj          !adjust the offset of y
down by 1 line
   GroupFEQ                   = FormFEQ            !save the feq of the
current group box
                                                   !next field should appear
in this box at these X and Y coordinates

   If clip(RC:SectionNotes)   <> ''                !If there is a group
comment
      FormFEQ                 += 1                 !  incement the feq
      Create(FormFEQ,Create:String,FormFEQ)        !  create the message
string
      FormFEQ{PROP:XPos}      = FormX              !  set the X
      FormFEQ{PROP:YPos}      = FormY              !  set the Y
      FormFEQ{PROP:Width}     = (len(clip(RC:SectionNotes))*4) + 10 !  set
the width
      FormFEQ{PROP:Height}    = 10                 !  set the height
      FormFEQ{PROP:Text}      = RC:SectionNotes    !  set the text
      FormFEQ{PROP:Scroll}    = True               !  make it scroll
      Unhide(FormFEQ)                              !  make it visible
      FormY += FormYadj                            !  adjust the Y offset
down from top for next control
   end !If

   ControlType# = True                             !turn on group control
flag for testing

Crea{*filter*}tryControl                  Routine

   FormFEQ                 += 2                                !allow for a
label
   LastFormFEQ             = FormFEQ                           !save the
last feq used

   Create(FormFEQ,FormControlType,GroupFEQ)                 ! create control
with a parent

   If RCT:AnswerLayout     = 3                                 !if label is
above the entry field
      FormY                += (FormYadj * 2)                   ! allow one
more line for the entry
   end !if

   FormFEQ{PROP:XPos}      = FormX                             !position to
X
   FormFEQ{PROP:YPos}      = FormY                             !  and Y
   FormFEQ{PROP:Width}     = FormWidth                         !set the
width
   FOrmFEQ{PROP:Height}    = FormHeight                        !set the
height
   FormFEQ{PROP:Scroll}     = True                              !make it
scroll

   myProp.SetProperty(RCA:CriteriaID,FormInitialValue)         !create a
property to hold the answer

   If clip(FormFormatType)  <> ''                              !if there is
any formatting text
      FormFEQ{Prop:Text}   = FormFormatType                    ! add it to
the field
   end !if                                                     !

   If FormControlType = Create:Droplist                        !if this is
for a drop list
      FormFEQ{PROP:From}   = DropList
   end

   FormFEQ{Prop:Use}       = myProp.GetProperty(RCT:AnswerTypeID) !assign
the use variable and any prefill value

   Unhide(FormFEQ)                                             !unhide it

   If RCT:AnswerLayout     > 0  and  RCT:AnswerLayout < 5      !if answer
calls for a label
      do PositionLabel                                         ! place it on
the form
   end !if

                                                               ! compute X
or Y for next control
   If RC:TabularLayout     > 1                                 !if tabular
format and more than 1 column
      FormX                += FormXadj                         ! adjust X to
new place on line
   else                                                        !else
      FormY                += FormYadj                         ! adjust Y to
next line down
   end !if                                                     !



Sun, 22 May 2005 04:23:00 GMT  
 create:group
Larry -

I'm sure that you're doing this, but just in case..

Are you unhiding the GROUP itself?

Quote:

>Is there some property I need to use to assure each child control is going
>to be visible and usable?

Jeff Slarve  
http://www.jssoftware.com


Sun, 22 May 2005 05:08:45 GMT  
 create:group
Yes I am, Jeff.  I did post the code a little earlier.

In case there is any ambiguity, I do assign the FormFEQ a unique value
before calling the routine.



Sun, 22 May 2005 05:43:17 GMT  
 create:group
Larry -

Are you checking to see if, in fact, the controls are being created?
Perhaps there's a problem with your FEQ value? Did you can let the RTL
create the feq value for you?

  FEQ = Create(0,YourControlType,YourControlParent)

Just a thought.

Quote:

>Yes I am, Jeff.  I did post the code a little earlier.

>In case there is any ambiguity, I do assign the FormFEQ a unique value
>before calling the routine.

Jeff Slarve  
http://www.jssoftware.com


Sun, 22 May 2005 05:49:15 GMT  
 create:group
I think you are onto the source of the problem.  I believe some controls
must be getting created using the same FEQ as the group.  Not sure how, but
I'm changing my FEQ assignments now and the first test looked promising.

Thanks.



Sun, 22 May 2005 06:28:48 GMT  
 create:group
Hi Larry,

Quote:

>   Create(FormFEQ,Create:Group)                    !  create the box

>   FormFEQ{PROP:XPos}         = FormX              !  set the X

The first thing that I would do is change this code to be:

 FormFEQ = Create(0,CREATE:Group)

etc.  Let the runtime library supply the correct FEQs.  It is quite
possible to run into other controls.

Best regards,

Arnr Baldvinsson
Icetips Software        
San Antonio, Texas, USA
www.icetips.com

ICQ:  113314380

Subscribe to information from Icetips.com:
http://www.icetips.com/getnotificationinfo.htm



Sun, 22 May 2005 07:24:57 GMT  
 create:group
What Arnor says and:
This codeline is wrong  - an non existing control cannot be parent
     Create(FormFEQ,Create:String,FormFEQ)        !  create the message
 Change to
   FormFeq=Create(0,Create:String,GroupFeq)

Regards
--
Bjarne Havnen
AdiTech Langaard Software
http://www.*-*-*.com/
http://www.*-*-*.com/
http://www.*-*-*.com/


Quote:
> There are two routine below that get called.  One builds the groupbox and
it
> gets called once for the group.  The other routine gets called for each
> control within the group.

> Thanks for having a look.

> BuildGroupBox                    Routine

>    If RC:BoxX                 = 0                  !if the X is not set
>       FormX                   = 3                  ! default it to
position
> 3
>    else                                            !else
>       FormX                   = RC:BoxX            ! use the value in the
RC
> record
>    end !if

>    If RC:GroupWidth           = 0                  !if the box width is
not
> set
>       RC:GroupWidth           = 1                  ! default it to width 1
> (full width)
>    end !if

>    If RC:BoxHeight            = 0                  !if box height is not
set
>       FormHeight              = 300                ! set it high for now,
> adjust it later
>    else                                            !otherwise
>       FormHeight              = RC:BoxHeight       ! set it to the value
in
> RC
>    end !if

>    Case RC:GroupWidth                              !check the box width
> field for box width option
>       of 1
>          FormWidth            = 438                !box is full width
>       of 2
>          FormWidth            = 219                !box is half width
>       of 3
>          FormWidth            = 146                !box is one third width
>       else
>          FormWidth            = 438                !anything else is going
> to be full width
>    end !case

>    Create(FormFEQ,Create:Group)                    !  create the box

>    FormFEQ{PROP:XPos}         = FormX              !  set the X
>    FormFEQ{PROP:YPos}         = FormY              !  set the Y
>    FormFEQ{PROP:Width}        = FormWidth          !  set the width
>    FormFEQ{PROP:Height}       = FormHeight         !  set the height
>    FormFEQ{PROP:Text}         = RC:ReviewCriteriaSection
>    FormFEQ{PROP:Boxed}        = True               !  put a box around it
>    FormFEQ{PROP:Trn}          = True               !  make sure the
controls
> can be seen
>    FormFEQ{PROP:Scroll}       = True               !  make it scroll
>    Unhide(FormFEQ)                                 !  make it visible

>    FormX                      += 3                 !adjust the offset of x
> to be right of line for next control
>    FormY                      += FormYadj          !adjust the offset of y
> down by 1 line
>    GroupFEQ                   = FormFEQ            !save the feq of the
> current group box
>                                                    !next field should
appear
> in this box at these X and Y coordinates

>    If clip(RC:SectionNotes)   <> ''                !If there is a group
> comment
>       FormFEQ                 += 1                 !  incement the feq
>       Create(FormFEQ,Create:String,FormFEQ)        !  create the message
> string
>       FormFEQ{PROP:XPos}      = FormX              !  set the X
>       FormFEQ{PROP:YPos}      = FormY              !  set the Y
>       FormFEQ{PROP:Width}     = (len(clip(RC:SectionNotes))*4) + 10 !  set
> the width
>       FormFEQ{PROP:Height}    = 10                 !  set the height
>       FormFEQ{PROP:Text}      = RC:SectionNotes    !  set the text
>       FormFEQ{PROP:Scroll}    = True               !  make it scroll
>       Unhide(FormFEQ)                              !  make it visible
>       FormY += FormYadj                            !  adjust the Y offset
> down from top for next control
>    end !If

>    ControlType# = True                             !turn on group control
> flag for testing

> Crea{*filter*}tryControl                  Routine

>    FormFEQ                 += 2                                !allow for
a
> label
>    LastFormFEQ             = FormFEQ                           !save the
> last feq used

>    Create(FormFEQ,FormControlType,GroupFEQ)                 ! create
control
> with a parent

>    If RCT:AnswerLayout     = 3                                 !if label
is
> above the entry field
>       FormY                += (FormYadj * 2)                   ! allow one
> more line for the entry
>    end !if

>    FormFEQ{PROP:XPos}      = FormX                             !position
to
> X
>    FormFEQ{PROP:YPos}      = FormY                             !  and Y
>    FormFEQ{PROP:Width}     = FormWidth                         !set the
> width
>    FOrmFEQ{PROP:Height}    = FormHeight                        !set the
> height
>    FormFEQ{PROP:Scroll}     = True                              !make it
> scroll

>    myProp.SetProperty(RCA:CriteriaID,FormInitialValue)         !create a
> property to hold the answer

>    If clip(FormFormatType)  <> ''                              !if there
is
> any formatting text
>       FormFEQ{Prop:Text}   = FormFormatType                    ! add it to
> the field
>    end !if                                                     !

>    If FormControlType = Create:Droplist                        !if this is
> for a drop list
>       FormFEQ{PROP:From}   = DropList
>    end

>    FormFEQ{Prop:Use}       = myProp.GetProperty(RCT:AnswerTypeID) !assign
> the use variable and any prefill value

>    Unhide(FormFEQ)                                             !unhide it

>    If RCT:AnswerLayout     > 0  and  RCT:AnswerLayout < 5      !if answer
> calls for a label
>       do PositionLabel                                         ! place it
on
> the form
>    end !if

>                                                                ! compute X
> or Y for next control
>    If RC:TabularLayout     > 1                                 !if tabular
> format and more than 1 column
>       FormX                += FormXadj                         ! adjust X
to
> new place on line
>    else                                                        !else
>       FormY                += FormYadj                         ! adjust Y
to
> next line down
>    end !if                                                     !



Sun, 22 May 2005 16:52:32 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. create:group on one TAB

2. Creating groups & icons

3. Creating Groups in Windows Progman

4. Rexx/PalmOS group on Yahoo (http://groups.yahoo.com/group/r-e-x-x_palmos/)

5. click the link for the best google group http://groups-beta.google.com/group/boysworld

6. Creating a list of Smalltalk users groups

7. dynamically create a group

8. Deployment Kit: Not creating program groups

9. Create Program Group

10. create new group

11. Creating switch groups in Cosmo ???

12. HELP TO CREATE A GROUP OF NEWS RELATED WITH ASSEMBLER

 

 
Powered by phpBB® Forum Software