What does the variables stand for......

J�rn Zietz <[EMAIL PROTECTED]> wrote:
Hi Curtis,

* Curtis cloud wrote:

> I am having a problem with creating panels on the fly and placing them in
> a groupbox.

> I am try to place up to 16 small panels in a groupbox in groups
> of four (4 rows). I can create the first row of panels but am having
> problems with creating additional rows on the fly.

> Example 1, suppose a user wants to create 7 panels in the
> groupbox, 4 in the first row and 
> 3 in the second row. I believe the problem is with my looping
> structure. The panels are created with three labels on them.

> Example 2, Suppose a user wants to create 13 panels, 4 in the first row, 4 in 
> the second row,
> 4 in the third row and 1 in the fourth row.

something like:

for i := 0 to myCountPanels - 1 do begin
myX := cOffsetX + ((i mod 4) * cDistanceX);
myY := cOffsetX + ((i div 4) * cDistanceY);
myPanel := TPanel.Create(myForm);
myPanel.Parent := ...;
myPaneel.SetBounds(...);
end;

HTH :-)

-- 
Cheers,
J�rn



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links









                
---------------------------------
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to