How to set my TextEditBoxWidget value from ActionComponent?
sorry newbie question can't seem find myself.
i have panel , panel contains texteditboxwidget so:
...
texteditboxwidget
(
km5tablemodelvaluewidgetid, // widgetid
ksyseditboxpmrsrcid, // rsrcid
kbindnone, // frame binding
frame(110, 10, 180, 30), // frame (l,t,r,b)
ktrue, ktrue // visible, enabled
0, // widget id of nudge button (0 don't one)
0, 0,// small, large nudge amount
0, // max num chars(0 = no limit)
ktrue,// read
kfalse,// should notify each key stroke
kfalse,// range checking enabled
kfalse,// blank entry allowed
0, // upper bounds
0, // lower bounds
"-", // initial text
),
...
i action panel menu , catch in m5actioncomponent class. want change texteditboxwidget's value "something".. now, how can that?
use itextcontroldata or set text km5tablemodelvaluewidgetid;
for instance first find icontrolview widget.
interfaceptr<icontrolview> yourcv(theparent, usedefaultiid());
interfaceptr<itextcontroldata> yourwidgetdata(yourcv, usedefaultiid());
pmstring yourtext = yourwidgetdata->getstring();
yourwidgetdata->setstring(pmstring( "your string " ));
regards
bartek
More discussions in InDesign SDK
adobe
Comments
Post a Comment