New topic: 

Moving Controls at Runtime

<http://forums.realsoftware.com/viewtopic.php?t=30504>

       Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic         Author  
Message       msdawe           Post subject: Moving Controls at RuntimePosted: 
Thu Oct 15, 2009 3:47 pm                        
Joined: Thu Oct 15, 2009 3:41 pm
Posts: 1              I'm trying to create a multiplication test application 
and what I want to do is dynamically create the test at runtime.  There is no 
way to know how many numbers the user wants to test on before runtime.

I've somewhat figured out how to create controls within an array at runtime, 
but I'm having trouble figuring out how to position those controls once 
created.  The controls would consist of 2 StaticText boxes (one for each 
operator of the funtion) and one TextField for the user to type the answer.

After reading around the forums it looks like I might be out of luck, but I 
figured I'd ask anyway.  Any idea how to dynamically move controls at runtime?

Thanks!

Martin   
                            Top                dglass           Post subject: 
Re: Moving Controls at RuntimePosted: Thu Oct 15, 2009 4:17 pm                  
      
Joined: Fri Sep 30, 2005 9:29 am
Posts: 611
Location: California              Set the .Top and .Left of each control in the 
array.

You'll know the height of each control so you'll be able to do the math for the 
offset to ensure decent/proper spacing.

Code:myCaptions(1).Top = 20
myCaptions(1).Left = 20

myCaptions(2).top = mycaptions(1).Top + myCaptions(1).Height + 10
mycaptions(2).left = mcaptions(1).left

   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to