Skip to main content
Inspiring
July 21, 2011
Question

Customize event handler for TextComboBoxWidget

  • July 21, 2011
  • 3 replies
  • 1214 views

Hi guys,

I want to customize "virtual bool16 LButtonUp(IEvent* e);" for my TextComboBoxWidget, and i create a new widget boss which inherits from kTextComboBoxWidgetBoss, and implement my own interface IID_IEVENTHANDLER.

However, the programe cannot run into my our event handler.

I notice that there were two topic in this forum asked this problem, but look like did not get the solution.

http://forums.adobe.com/thread/327975

http://forums.adobe.com/thread/454962

Any comment will be appreciated.

Thansk,

Aidy

This topic has been closed for replies.

3 replies

Inspiring
January 27, 2014

Has anybody been able to get an event handler on TextComboBoxWidget yet?

My problem is that I have a combobox on a dialog. While it is selected and an enter key is pressed, I need to do some validation and stop the dialog from being closed if the input is invalid.

I tried to make a custom widget like

Class

    {

        kMyTextEditBoxWidgetBoss,

        kTextEditBoxWidgetBoss,

        {

            /** The plug-in's implementation of an event handler,

                extending CIDEditBoxEventHandler.

            */

            IID_IEVENTHANDLER,            kMyEditBoxEventHandlerImpl,   

        }

    },

type MyNonEveEditBoxWidget (kViewRsrcType) : TextEditBoxWidget (ClassID = kMyTextEditBoxWidgetBoss) {};

type MyEditBoxWidget (kViewRsrcType) : MyNonEveEditBoxWidget(ClassID = kMyTextEditBoxWidgetBoss)

{

    WidgetEveInfo;

};

type MyComboBoxWidget (kViewRsrcType) : MyNonEveEditBoxWidget(ClassID = kTextComboBoxWidgetBoss)

{   

    DropDownListControlData;

    WidgetEveInfo;

};

While this works for MyEditBoxWidget(as illustrated in cellpanel sdk example), it does not give me the control in case of MyComboBoxWidget.

Is there any other way if not an event handler to do it?

Participating Frequently
January 28, 2014

If all you  want to do is validation, you should be able to just implement your own CTextDataValidation.

Inspiring
January 28, 2014

This helped me solve my problem.

I'm referring to Dirk's first reply.

http://forums.adobe.com/message/1306850#1306850

AidySunAuthor
Inspiring
September 8, 2011

The issue still exists.

AidySunAuthor
Inspiring
July 24, 2011

Still need help.