Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 9th, 2025, 11:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: why does a Button have a Child?
PostPosted: March 21st, 2009, 1:46 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Here's a curious thing.
When I check the number of children on host objects on a page, Button objects show as having 1 child.

for example
Code:
testVar1 = this.GetNumberChildren() +"  ---  " +this.GetFirstChild().GetName() ;


will return something like this: 1 --- _2_


Failing a good explanation, will take any good jokes in answer to "why do Buttons have children?" :)

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 21st, 2009, 7:02 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Perhaps it's like in the UK, where when you buy and item of clothing you always get a spare button?

Or more practically, the child relates to the button text which is considered separate to the button host object.

Try this; create a button, add some text and the tell it to hide the child of the button.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 22nd, 2009, 5:59 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
That makes sense. Thanks Mac. You hit it on the button.

Button_12.GetFirstChild().Roll(1080,5)
Button_12.GetTextObject().Roll(1080,5)

...are apparently the same thing.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group