﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » My ComboBox is not seeing my enum</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 14:18:51 GMT</lastBuildDate><ttl>20</ttl><item><title>My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19437.aspx</link><description>Hi All.&lt;/P&gt;&lt;P&gt;I must have taken my stupid pills today because this should be simple.&lt;/P&gt;&lt;P&gt;My enum is defined in the form like this:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;enum&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Months&lt;/FONT&gt;&lt;FONT size=2&gt; : &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; { January = 1, February = 2, March = 3, April = 4, May = 5, June = 6, July = 7, August = 8, Spetember = 9, October = 10, November = 11, December = 12 };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;The combo box is set up like this:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.BindingField = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"yearend_mth"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.BusinessObject = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.boPlan_hdr;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.BusinessObjectEvaluated = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.DropDownStyle = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ComboBoxStyle&lt;/FONT&gt;&lt;FONT size=2&gt;.DropDownList;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.FormattingEnabled = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.Location = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; System.Drawing.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Point&lt;/FONT&gt;&lt;FONT size=2&gt;(120, 162);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.Name = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"cboyearend_mth"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.ParentContainer = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.PopulationType = MicroFour.StrataFrame.UI.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ListPopulationType&lt;/FONT&gt;&lt;FONT size=2&gt;.Enumeration;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.PopulationEnumName = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Trinity.Forms.Months"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.Size = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; System.Drawing.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Size&lt;/FONT&gt;&lt;FONT size=2&gt;(121, 21);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.TabIndex = 13;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;But when I run the form, nothing shows up in the drop down list. I have no idea what the problem could be.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 18 Sep 2008 17:11:21 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19534.aspx</link><description>[quote][b]Peter Denton (09/17/2008)[/b][hr]G'day&lt;P&gt;Hope this helps. I also reccomend all the enums in one class.&lt;/P&gt;&lt;P&gt;Peter[/quote]&lt;P&gt;&amp;nbsp;&lt;P&gt;Done yesterday :)</description><pubDate>Thu, 18 Sep 2008 17:11:21 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19491.aspx</link><description>G'day&lt;/P&gt;&lt;P&gt;A technique I use when I'm trying to set up a lookup on an enum, is to create a variable of the enum type, then get the type of the variable, and the AssemblyQualifiedName of the type, e.g.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; fred &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CloseReason = CloseReason.FormOwnerClosing&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;MsgBox(fred.GetType.AssemblyQualifiedName)&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Usually I do this in the debugger, put a breakpoint on the Msgbox line, put fred.GetType.AssemblyQualifiedName in the Watch and copy the literal value from the Watch to where I want the enum name. Especially useful wher it isn't your enum that you're trying to use.&lt;/P&gt;&lt;P&gt;Hope this helps. I also reccomend all the enums in one class.&lt;/P&gt;&lt;P&gt;Peter</description><pubDate>Wed, 17 Sep 2008 19:30:34 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19464.aspx</link><description>Glad you found your issue.&amp;nbsp; The only time that you will generally have an issue with the VS DTE not "seeing" an enum when you know with all of your being that it should is when the AppDomain of the DTE is holding on to an older version of an assembly and will not load the newly built assembly housing the enum.&amp;nbsp; This is common if the assembly is stored in the GAC and from time to time VS just doesn't want to let go for unknown reasons.&amp;nbsp; But at any rate, it looks as though you were already on top of it :)</description><pubDate>Wed, 17 Sep 2008 09:48:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19448.aspx</link><description>[quote][b]Edhy Rijo (09/16/2008)[/b][hr]Hi Marcia,&lt;P&gt;If not, try creating the Enum in a separate class file, re-build, then assign the enum to the combobox again and test.&lt;/P&gt;&lt;P&gt;[/quote]&lt;/P&gt;&lt;P&gt;That is on my list. So far, I have only 2 enums in the project, so it will not be too hard to refactor this later after I have wowwed the client with how quick I am :)</description><pubDate>Tue, 16 Sep 2008 15:17:44 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19447.aspx</link><description>I second Edhy's suggestion about placing the enums in a separate class file.&amp;nbsp; Glad you got it going!</description><pubDate>Tue, 16 Sep 2008 14:38:14 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19446.aspx</link><description>Hi Marcia,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Exit&amp;nbsp;VS and open the solution again and re-build, then see if it works.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;If not, try creating the Enum in a separate class file, re-build, then assign the enum to the combobox again and test.&lt;/LI&gt;&lt;/OL&gt;</description><pubDate>Tue, 16 Sep 2008 14:36:08 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19445.aspx</link><description>OK - Got it solved. The enum was defined in the wrong place and that is why the framework couldn't see it.&lt;/P&gt;&lt;P&gt;Thanks for trying to help.</description><pubDate>Tue, 16 Sep 2008 14:32:55 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19444.aspx</link><description>OK - I stepped thru the code in Combobox.Requery() and I am seeing that this line in the GetReferencedAssemblies() method:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Try to just get the type before moving on&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;loType = Type.GetType(TypeName, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;returns null.&lt;/P&gt;&lt;P&gt;It seems that it cannot find the enum. What would cause this?&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 16 Sep 2008 14:10:47 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19442.aspx</link><description>[quote][b]Bill Cunnien (09/16/2008)[/b][hr]Try changing:&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.DropDownStyle = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ComboBoxStyle&lt;/FONT&gt;&lt;FONT size=2&gt;.DropDownList;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.DropDownStyle = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ComboBoxStyle&lt;/FONT&gt;&lt;FONT size=2&gt;.DropDown;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Any difference?[/quote]&lt;P&gt;No - still no items in the list</description><pubDate>Tue, 16 Sep 2008 13:38:35 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: My ComboBox is not seeing my enum</title><link>http://forum.strataframe.net/FindPost19440.aspx</link><description>Try changing:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.DropDownStyle = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ComboBoxStyle&lt;/FONT&gt;&lt;FONT size=2&gt;.DropDownList;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.cboyearend_mth.DropDownStyle = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;ComboBoxStyle&lt;/FONT&gt;&lt;FONT size=2&gt;.DropDown;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Any difference?</description><pubDate>Tue, 16 Sep 2008 12:55:06 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>