Download MetaTrader 5

Items of the ComboBox are not displayed.

To add comments, please log in or register
olle.onkel
50
olle.onkel 2014.08.05 14:04 
Hello community,

I got stuck on a problem with the ComboBox from the standard library.

After successful creation with the "Create" method I intended to add some items with the "ItemAdd" method. Finally the ComboBox is added to a CDialog. The source is as follows:

   int y2=y1+EDIT_HEIGHT;
   if(TradingDialogTradesComboBox.Create(chartid,"TradingDialogTradesComboBox",0,x1,y1,x2,y2))
     {

      TradingDialogTradesComboBox.ListViewItems(16);
      for(int t=0; t<16; t++)
        {
         TradingDialogTradesComboBox.ItemAdd("Test Item "+IntegerToString(t),t);
        }

      this.Add(TradingDialogTradesComboBox);
     }
   else
     {

As mentioned, the ComboBox is created without any error. The "Items" are created without any errors. The addition of the ComboBox to the CDialog is done without any problems. But when I click the "Button" of the ComboBox to extract the menu, any of the Items is displayed despite of the fact that they are listed in the ObjectList of the Terminal. The attempt to edit these Items manually shows, that they are not visualized. See:

Items not visible

I kindly ask you for your help and clues, because in this case I have no idea where to start to eliminate the cause.

In addition, I checked the Controls.mq5 Example which is working fine on the other hand. See:

The Controls.mq5 Example




This makes me even more clueless.


Kindly,

Olle Onkel

To add comments, please log in or register