Simple Question
Wednesday, August 9, 2006 by jlaj1989 | Discussion: DesktopX
Set frm = DesktopX.CreateForm
frm.AddPreference "Text1"
frm.Preference("Text1").Type = "ComboList"
frm.Preference("Text1").AddValue Like a command right here that will add everything in the Object Navigator.
frm.Prompt
Thanks
{EDIT} I found another example. When you choose the parent/owner, in the Summary tab. Thats what im talking about how can i have a pull down like that.
Reply #4 Friday, August 11, 2006 4:48 PM
jlaj1989: I believe the addvalue command unfortunately adds only one entry at a time to your combobox. You could potentially set up a loop in which this command would be called multiple times but physically written in the code only once. This would just depend on how you are retrieving objects to be added into the combo box.
-Mike
[Stardock Support]
Reply #6 Friday, August 11, 2006 4:55 PM
There's an example of for loops here:
http://www.programmershelp.co.uk/vbforloops.php
The index variable that you use in the loop changes with each iteration, so this would be perfect when used to index into an array.
-Mike
[Stardock Support]
Reply #7 Saturday, August 12, 2006 3:41 PM
The pull downs in the Object Property menus are a bit more complex--they don't list themselves for example. But I think you could get a list using a For Each, and then decide if you want to read that into an array and then into your list, or just into the list directly.
Page 12 of the Scripting PDF describes DesktopX Enumerators. I had this pointed out to me once, and am thankful as they are extremely useful. We could read the Object.Names into a Combo-Box thusly:
Dim objElem For Each objElem In DesktopX.Objects Control.AddItem objElem.Name Next |
You'll have to figure out how and when to update the list, probably every time you open it, so that it always has all the latest objects listed.
Reply #8 Sunday, August 13, 2006 5:47 PM
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!








Reply #1 Friday, August 11, 2006 3:36 PM
I will pass your inquiry onto technical support and they will get back with you as soon as they can.
Thanks!
Jenny