3 Replies Latest reply on Jan 26, 2007 10:40 AM by ur_dtrain

    How do you set a tooltip to the ComboBox dropdown list?

      I have a combo box and when the user opens it up I need to display tooltip text on the dropdown list when the user hovers over them. Heres the code that I have which works:

      MyComboBox.addEventListener("open", cmbOpen);

      private function cmbOpen (e:DropdownEvent) : void {
      MyComboBox.dropdown.showDataTips = true;
      MyComboBox.dropdown.dataTipFunction = comboDataTip;

      public function comboDataTip (item:Object) : String {
      var temp_str:String = "";

      if (item.varValue != null)
      temp_str = item.data
      return temp_str;

      The only way that I've been able to make this work is to assign it on the open event. Is there any other way?

      Also.. how do you move the tooltip text. It pops up in the wrong place and i want to shift it to the right a little bit.. I tried this code but the function doesn't get called.

      MyComboBox.addEventListener("toolTipShow", toolTipShow);
      and ive used
      MyComboBox.dropdown.addEventListener("toolTipShow", toolTipShow);

      private function toolTipShow (e:ToolTipEvent) : void {
      trace("e: " + e.target);
      trace("e: " + e.toolTip);

      I need tooltipshow function to get called so I can adjust the tooltips x and y coord..

      Any ideas?