• Home
  • Products
    • Game Engine
      • Base
      • Mathematics
      • Geometry
      • Physics
      • Particles
      • Animation
      • Graphics
      • Game
      • Game UI
    • Windows Forms
      • Docking Windows
      • Text Editor Control
  • Downloads
  • Buy
    • Overview
    • Professional
    • Indie
    • Non-Commercial
  • Support
    • Overview
    • Blog
    • Forum
    • License FAQ
    • Documentation
  • About
    • About Us
      • Services
    • Contact Us
    • Press
    • Legal Terms
      • Imprint (English)
      • Imprint (German)
Select the search type
 
  • Site
  • Web
Search
DigitalRune.com
Login |Register
NEWS News RSS Feed BLOG Blog RSS Feed FORUM News RSS Feed DOCUMENTATION DigitalRune Software on YouTube DigitalRune Software on Twitter
You are here: SupportForum

If you want to contribute to the forum discussions, please Register or Login.

SearchHome
  • 1
  • 2
  • 3
  • 4
  • 5
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineGet element from DropDownButtonGet element from DropDownButton
Previous
 
Next
New Post
2/13/2012 6:34 PM
 
Jarzka
No Ranking

Joined: 2/5/2012
Posts: 19
Get element from DropDownButton  Modified By Jarzka  on 2/13/2012 7:37:57 PM

Hi, it's me again and I'm having just another problem :<

How can I get object I have added to DropDownButton? I closest method I have found is Items.ElementAt but it requires generic System.Collections.Generic.IEnumerable. I tried to solve this but I didn't get it. Why I just cant get the string object I have added to my DropDownButton list?

 
New Post
2/14/2012 7:48 AM
 
HelmutG
6th Level Poster

www.digitalrune.com
Joined: 10/15/2006
Posts: 565
Re: Get element from DropDownButton 

If you have added strings to the DropDownButton, you can get the selected string like this:

var selectedString = (string)myDropDownButton.Items[myDropDownButton.SelectedIndex];

Is this what you are looking for?

 
New Post
2/14/2012 9:39 AM
 
Jarzka
No Ranking

Joined: 2/5/2012
Posts: 19
Re: Get element from DropDownButton  Modified By Jarzka  on 2/14/2012 10:56:40 AM

Ah yes. I didn't realise it's possible to get items with the square brackets. Thanks :)

By the way is there any difference between string selectedString and var selectedString?

 
 Page 1 of 1
Previous
 
Next
HomeHomeDigitalRune Sof...DigitalRune Sof...Game EngineGame EngineGet element from DropDownButtonGet element from DropDownButton


DigitalRune is a trademark of Garstenauer Information Technology OG.

Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg
Austria (EUROPE)
office@digitalrune.com

Home Products Downloads Buy Support About Us
Game Engine Particles Windows Forms Professional Blog Services
Base Animation Docking Windows Indie Forum Contact Us
Mathematics Graphics Text Editor Control Non-Commercial License FAQ Press (News)
Geometry Game Documentation Legal Terms
Physics Game UI Imprint
Impressum
Copyright © 2006-2012 Garstenauer Information Technology OG Terms Of UsePrivacy Statement