2015-08-20 02:25 PM - last edited on 2023-07-13 03:42 PM by Doreena Deng
2015-08-25 01:04 PM
2015-08-28 01:35 PM
2015-08-31 03:08 PM
DG::PopUp databasePopup; int SelectedIndex = databasePopup.GetSelectedItem();
2015-08-31 04:26 PM
Rinovo wrote:Below is cutted source code.
Maybe someone have example of using PopUpControls?
class TabAuxLogItem : public DG::TabPage , private DG::PopUpObserver { public: TabAuxLogItem( const DG::TabControl& tabControl, short tabItem=1 ); ~TabAuxLogItem(); private: virtual void PopUpChanged (const DG::PopUpChangeEvent& ev); private: DG::PopUp mi_prf; };
TabAuxLogItem::TabAuxLogItem( const DG::TabControl& tabControl, short tabItem ) : DG::TabPage( tabControl, tabItem, ACAPI_GetOwnResModule(), RTAB_AUXL_ITEM, ACAPI_GetOwnResModule() ) , mi_prf( GetReference(), PRF ) { mi_prf.Attach( *this ); } TabAuxLogItem::~TabAuxLogItem() { mi_prf.Detach( *this ); } void TabAuxLogItem::PopUpChanged (const DG::PopUpChangeEvent& ev) { if ( ev.GetSource() == &mi_prf ) { UID id = (UID)mi_prf.GetItemValue( mi_prf.GetSelectedItem() ); UpdateProfileID( id ); } }
2015-09-01 07:29 AM
DG::PopUp m_comboModels;in your cpp file you can fill it by this way
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
void PopUpChanged(const DG::PopUpChangeEvent& e);.cpp
void PopUpChanged(const DG::PopUpChangeEvent& e) { Int32 selValue = TruncateTo32Bit(e.GetSource()->GetItemValue(this->m_comboModels.GetSelectedItem ())); }
2015-09-03 09:13 AM
2015-09-04 10:22 AM
IconPushRadio 8 22 52 52 1 32107
RadioOneID = 4, /... DG::IconPushRadio RadioOne;
RadioOne (GetReference (),RadioOneID)
RadioOne.SetIcon(DG::Icon(ACAPI_GetOwnResModule (),32106 ));
2015-09-04 02:02 PM
2015-09-07 08:33 AM