Copy link to clipboard
Copied
When I enter multiple lines of text in a MultilineTextEditBoxWidget, I want to be able to move the cursor up and down using the up and down arrow keys. However, currently, the cursor can only move left and right.
I'm not sure if this is due to a missing parameter setting or if the MultilineTextEditBoxWidget provided by the SDK does not support this functionality. However, I noticed that in InDesign's PDF Export dialog, the multiline input field already supports this behavior.
Differences:
kBindNone
large nudge = 0
upper bounds = 100
notify keystrokes = false
Plenty speculation ahead:
My guess is the notify keystrokes flag. kTrue is rare in the SDK examples, and I doubt it is intentional for kSpellAlternativeEditBoxID. Could be the key strokes are absorbed with this flag.
Given the (NEW) comment, I assume you copied it from kPDFVTUIDataSourceFileTextWidgetID or kWatermarkUIEditBoxWidgetID. Have you tried with false as I already suggested above?
Otherwise it could be some e
...Copy link to clipboard
Copied
As shown in the image, the multi-line text box in this PDF export dialog supports moving the cursor up and down using the arrow keys. I defined the following type:
However, when I define my edit box control using the EVEMyMultilineTextEditBoxWidget type and input multiple lines of text, the cursor is actually not able to move up and down using the arrow keys.
Does anyone know which k...Boss I should use to enable this functionality?
Copy link to clipboard
Copied
Tagging @Dirk Becker
Copy link to clipboard
Copied
The type looks ok, kPDFDescritionTextWidgetID uses the same.
You should also have quoted your actual fr, e.g.
The IControlView uses typical kSysEditBoxRsrcId,kAppUIPluginID, and is enabled.
IID_IEDITBOXATTRIBUTES has both flags (readonly, and want key stroke) set to kFalse.
Data validation is also disabled.
Not sure whether anything of that is relevant.
I looked only at the Mac.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Differences:
kBindNone
large nudge = 0
upper bounds = 100
notify keystrokes = false
Plenty speculation ahead:
My guess is the notify keystrokes flag. kTrue is rare in the SDK examples, and I doubt it is intentional for kSpellAlternativeEditBoxID. Could be the key strokes are absorbed with this flag.
Given the (NEW) comment, I assume you copied it from kPDFVTUIDataSourceFileTextWidgetID or kWatermarkUIEditBoxWidgetID. Have you tried with false as I already suggested above?
Otherwise it could be some extra setup code, maybe using a private Drover call. Once upon a time IControlView had a getter for the SysControl / HWND so we could look at the Windows side, but that's gone. If I were desperate I'd try Windows API such as EnumChildWindows() and dig deeper from there.
If you only need the key strokes to update a related display, you could also watch InDesign's events. To learn about focus / blur, observe your kMyeditboxWidgetID for protocol IID_IEVENTHANDLER, message is kEditBoxGetKeyFocusMessage or kEditBoxGiveUpKeyFocusMessage. Between those, register/unregister an IEventWatcher at IEventDispatcher. Works at least here on the Mac.
There is also a very old "filter" programming pattern to subclass the boss class, move the event handler implementation to another IID (any of yours will do) and provide your own event handler that passes on most calls. Somewhere deep in the SDK it is mentioned that event handlers are discouraged, so you better also stay away from that.
Copy link to clipboard
Copied
Thank you very much for your explanation. The issue has been resolved. The problem was caused by the small nudge value. Once I set small nudge to 0, it worked correctly. It seems that small nudge and large nudge are used in single-line text editors, where pressing the up/down arrow keys can adjust the numeric value in the editor. However, in this case, I’m using a multi-line text editor, where such behavior is not needed. So both values should be set to 0.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more