Quantcast
Channel: ArchiCAD-Talk - Developer Forum
Viewing all articles
Browse latest Browse all 564

Custome value User control

$
0
0
Author:ggiloyan
Posted: Tue Sep 01, 2015 6:29 am (GMT+1)


this->m_comboModels defined in .h file
like this

Code:
DG::PopUp         m_comboModels;


in your cpp file you can fill it by this way

Code:
this->m_comboModels.DeleteItem(DG::PopUp::AllItems);
for (int i = 0; i < <your array>; i++)
{
   this->m_comboModels.AppendItem();
   this->m_comboModels.SetItemText (DG::PopUp::BottomItem, GS::UniString::Printf("%s", <display member>));
   this->m_comboModels.SetItemValue (DG::PopUp::BottomItem, <value member>);
}


If you need to catch on selected change event of your popup control then you should inherit your dialog or pallete class from public DG::PopUpObserver

and use like this

.h
Code:
void   PopUpChanged(const DG::PopUpChangeEvent& e);


.cpp

Code:
void PopUpChanged(const DG::PopUpChangeEvent& e)
{
   Int32 selValue = TruncateTo32Bit(e.GetSource()->GetItemValue(this->m_comboModels.GetSelectedItem ()));
}


Viewing all articles
Browse latest Browse all 564

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>