List Box Dialog Object VB CS4 or CS2
It appears that the InDesign Dialog object doesn't allow you to place list boxes. Does anyone know a work around for this. I need to match up the items for two lists that can contain 40 - 50 items each. Any thoughts?
They have something called a drop down list:
var aStringArray = new Array;
aStringArray.push("Hello");
aStringArray.push("World!");
var myDialog = app.dialogs.add ({name:"My First Dialog",canCancel:true});
with (myDialog)
with (dialogColumns.add())
with (dialogRows.add())
staticTexts.add ({staticLabel:"My List"});
dropdowns.add ({stringList:aStringArray, selectedIndex:0});
I guess 'real' Windows Listboxes are not supported -- can't find them in the newer (CS3) ScriptUI as well.
>..match up the items for two lists..
How were you planning to 'match up' two listboxes? Perhaps you can place two dropdown lists side by side?
Similar Messages
-
Declaring constant data in a list box - Dialog programming
i need to declarare some constant data 1...4 in list box in dialog programming i have done some coding its not working here is the code, can you plz tell me whats wrong in the code non of the values are displaying in drop downbox.
type-pools vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
clear list.
REFRESH LIST.
value-key = '1'.
value-text = 'Sales & Distribution'.
append value to list.
value-key = '2'.
value-text = 'Material Management'.
append value to list.
value-key = '3'.
value-text = 'Finance & Controlling'.
append value to list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.I think your code is correct onlybut the problem may be where
you are passing the internal table to the FM 'VRM_SET_VALUES' ...
Try to use the following code..
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list[] -
Can't get "true" height of text box (text object) in Photoshop CS4-CS6 on Mac
I'm seeing this behavior in CS4, CS5 and CS6 on the Mac using AppleScript. When I get the height of a text object layer as such:
tell app "Adobe Photoshop CS4"
tell current document
set textObjectHeight to height of text object of art layer 1
end tell
end tell
The value returned doesn't match the height of the text object. In my mind the text object is the box that's displayed when I click on text in a text layer with the text tool active. The value for the width appears to match, just as I'd expect.
I'm trying to get the height and width of the text box (text object) so that I can draw a box "underneath" it on another layer so that one can tell where the text box is. Kind of an FPO-type assistant. I'm currently using the position values and the height and width to create a colored box. I realized that the height isn't exactly right.
Any help would be great appreciated. I've not explored the use of Javascript thus far, but am open to that as a solution.
Thanks,
StephanI tried your code and it works just fine here… I used CS5 to try it… Here is a screen shot… I just put a solid fill layer at the bottom so you can see the guides…
Script editor's event log gives me…
tell application "Adobe Photoshop CS5"
activate
get position of text object of art layer 1 of current document
{150.0, 100.0}
get width of text object of art layer 1 of current document
800.0
get height of text object of art layer 1 of current document
449.999969482422
make at end of current document with properties {name:"fill"} new art layer
art layer 2 of document "Untitled-1"
select current document region {{150.0, 100.0}, {950.0, 100.0}, {950.0, 549.999969482422}, {150.0, 549.999969482422}} without antialiasing
current application
fill selection of current document with contents {class:RGB color, red:255, green:0, blue:0} blend mode normal opacity 100 without preserving transparency
current application
deselect current document
current application
end tell -
Hello There,
I am recording an SAP portal application, whereby the list boxes are recorded twice.
For example: see the code below where during the recording I selected the value from drop down once but this step recorded twice. Moreover, It happens only to the drop down objects only.
Browser("Create Sample Request").SAPPortal("Create Sample Request").SAPFrame("Sales Sample Create -").SAPList("Sample Reason: *").Select "Quality Issue"
Browser("Create Sample Request").SAPPortal("Create Sample Request").SAPFrame("Sales Sample Create -").SAPList("Sample Reason: *").Select "Quality Issue"
Please advise.
Regards
Adil SyedAdil
You may want to try reposting your question on the forums specifically for the QTP product. Here's the link.
http://h30499.www3.hp.com/t5/Functional-Testing-QTP/ct-p/sws-Fun_Test -
Help with dialog list box(acrobat javascript)
The following code is an example in the guide of acrobat. Now i want to list some names store in an array. So i did some changes.But it can't work.ther are errors with subl:{}. hope some help.
var dialog3 = {
name=new Array();
name[1]=lucy;
name[2]=lily;
name[3]=han;
// This dialog gets called when the dialog is created
initialize: function(dialog) {
this.loadDefaults(dialog);
// This dialog gets called when the OK button is hit.
commit: function(dialog) {
// See the Dialog Object for a description of how dialog.load
// and dialog.store work.
var elements = dialog.store()["subl"];
// do something with the data.
// Callback for when the button "butn" is hit.
butn: function(dialog) {
var elements = dialog.store()["subl"]
for(var i in elements) {
if ( elements[i] > 0 ) {
app.alert("You chose \"" + i
+ "\", which has a value of " + elements[i] );
loadDefaults: function (dialog) {
dialog.load({
subl:
for(i=1;i<4;i++)
name[i]:+i
// The Dialog Description
description:
name: "Adobe Acrobat Products", // Title of dialog
elements: // Child Element Array
type: "view",
align_children: "align_left",
elements: // Child Element Array
type: "cluster",
name: "Select",
elements: // Child Element Array
type: "static_text",
name: "Select Acrobat you use",
font: "default"
type: "list_box",
item_id: "subl",
width: 200,
height: 60
type: "button",
item_id: "butn",
name: "Press Me"
type: "ok_cancel"
app.execDialog(dialog3);sorry ,the code is like this:
name=new Array();
name[1]='lucy';
name[2]='lily';
name[3]='han';
var dialog3 = {
// This dialog gets called when the dialog is created
initialize: function(dialog) {
this.loadDefaults(dialog);
// This dialog gets called when the OK button is hit.
commit: function(dialog) {
// See the Dialog Object for a description of how dialog.load
// and dialog.store work.
var elements = dialog.store()["subl"];
// do something with the data.
// Callback for when the button "butn" is hit.
butn: function(dialog) {
var elements = dialog.store()["subl"]
for(var i in elements) {
if ( elements[i] > 0 ) {
app.alert("You chose \"" + i
+ "\", which has a value of " + elements[i] );
loadDefaults: function (dialog) {
dialog.load({
subl:
for(i=1;i<4;i++)
"name[i]":-i
// The Dialog Description
description:
name: "Adobe Acrobat Products", // Title of dialog
elements: // Child Element Array
type: "view",
align_children: "align_left",
elements: // Child Element Array
type: "cluster",
name: "Select",
elements: // Child Element Array
type: "static_text",
name: "Select Acrobat you use",
font: "default"
type: "list_box",
item_id: "subl",
width: 200,
height: 60
type: "button",
item_id: "butn",
name: "Press Me"
type: "ok_cancel"
app.execDialog(dialog3); -
List Box - Object How do you get "allow multiple item selection" option to work?
developing a fillable PDF form using livecycle. I have several list boxes that contain multiple text items. I have entered all items directly into the item list and I have selected "allow multiple selection". The object is committed on exit, All the binding options have been left on default settings. BUT when the form is tested it will not allow multiple selections. I cannot find anything in help to resolve this. CAN Someone help me. This is urgent!!!!!
Dear Deb
Thank you for your suggestion, but it does not appear to work. I used the alt key then my mouse to select, but it still only allows for 1 selection. I do not see the sample you said you included, so I cannot check to see if I have a setting incorrect. If you have any other suggestions I would really appreciate it or if there is a way for you to look at the form, at this point I am open to any suggestions. -
How to add List Box in Dialog Screen
Hi All,
I need to add list box in Dialog screen.
In Dialog screen I have 2 radio buttons "Yes" and 'NO'.
If user selects radio button YES, then under Yes I need to display values in list box and these values should be retrieved from one table.
If user selects Radio button NO then under NO I need to display values in list box.
Please give the solution for above requirement.
Thanks
VijayVijay Reddy ,
To get Drop Drown Box on screen .
Follow these steps.
1.Go to T.Code SE51 and Select Laypout for the Screen.
2.Double click on the field for which u want Dropdown box.
3.Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.Save and Activate ur screen .
5.Enter the following piece of code in the PBO of the screen.(Change for ur
requirement).
The following logic needs to be written under PBO of the screen logic.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
6.Observe the above code and change as for ur requirement.
I hope that it helps you .
Regards,
Venkat.O -
Handle text using list box in dialog program
hi,
I am working on dialog program , Created two fileds , one is list box type I/O field and another is i/O field which displays text based on value selected in list box.
Please provide any inf how to Handle text using list box value in dialog program.
thanksHi,
<li>Check the screen to know how to set I/O field to set as listbox.[ dropdown box picture|http://2.bp.blogspot.com/_O5f8iAlgdNQ/Sm7RBrqfjcI/AAAAAAAAFaU/RateViiVqrU/s1600-h/drop_down-754481.JPG]
<li>in the above screen we need to set FctCode for the dropdown box field so that when you select value from the dropdown box PAI event is triggered.
<li>screen flow logic like below
PROCESS BEFORE OUTPUT.
MODULE values_into_dropdown.
FIELD g_bukrs.
FIELD g_text.
PROCESS AFTER INPUT.
FIELD g_bukrs.
FIELD g_text MODULE get_bukrs_txt.
<li>Logic to fill Dropdown field with values.
PROGRAM sapmztest_dropdown.
DATA: g_bukrs TYPE t001-bukrs.
*& Module VALUES_INTO_DROPDOWN OUTPUT
MODULE values_into_dropdown OUTPUT.
TYPE-POOLS:vrm.
DATA:
field TYPE vrm_id,
it_values TYPE vrm_values,
wa_values LIKE LINE OF it_values.
DATA: t001 TYPE t001 OCCURS 0 WITH HEADER LINE.
IF it_values[] Is INITIAL.
SELECT * FROM t001 INTO TABLE t001 UP TO 10 ROWS.
LOOP AT t001.
wa_values-key = t001-bukrs.
wa_values-text = t001-butxt.
APPEND wa_values TO it_values.
CLEAR wa_values.
ENDLOOP.
ENDIF.
field = 'G_BUKRS'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = FIELD
values = it_values.
ENDMODULE. " VALUES_INTO_DROPDOWN OUTPUT
*& Module get_bukrs_txt INPUT
MODULE get_bukrs_txt INPUT.
read table it_t100 into wa_t100 with key bukrs = g_bukrs.
g_text = t001-butxt.
ENDMODULE. " VALUES_INTO_DROPDOWN INPUT
I hope that it helps you.
Thanks
Venkat.O -
How to capture the selected values from module pool dialog list box !
Hi experts,
Can anyone help me out in capturing the values from the list box.
i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
Your inputs are appreciated.
Thanks,
Vijay.Along with the PBO and PAI event, add a POV event in the flow logic of the screen
DEMO_DROPDOWN_LIST_BOX -is a good demo example.
PROCESS ON VALUE-REQUEST.
FIELD structure_name-field_name MODULE create_dropdown_box.
In the report :
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
sdyb_conn-carrid will contain your selected field -
How do i get a list of all objects in a combo box
I want to get the list of all Objects in a JComboBox. I appreciate your help! Thanks!
I already know the solution with getItemCount and
then the for loop with getItemAt. I'm curios if there
exist somethig like Object[] getAllItems()If it's not in the API, then it's not available. You can create your own ComboBoxModel that will return an Object[] of elements and call setModel on your combobox. -
Values not populating in list box in dialog programing.
hi,
i am facing a problem i.e. i am having a listbox on screen , in pbo i am filling that listbox with some values in an internal table.
But i am not able to populate the values i.e. while i am debugging the pai ......the list box is containing nothing.
So needed some help in this issue.
regards,
someshHi,
Try to read these links. It will give you some pointers regarding on your problem.
<link-farm removed>
Revert if you have still any concern.
Thanks,
iostreamax
Edited by: Suhas Saha on Feb 21, 2012 8:50 AM -
List box in dialog programming
Hi Frnds,
i am working on a complex scenario,
i want to print 3 list box.
first one i can show but the problem is with second one and third one.
first list box have three fields suppose
program
events
movies
when user will select either one , suppose he will select program
then in second listbox program releted entries should be displayed like fiction , non fiction.
and when he will select any entry then in third list box corresponding sub entries should be come.
all data i have in ztables.
i can make search help also.
any suggestion should be appreciated.
Thanks and Regards
vijayUse this program!
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
TABLES: sscrfields.
Selection screen
List box
PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10
USER-COMMAND abc.
Radio buttons
PARAMETERS: rb1 RADIOBUTTON GROUP ab MODIF ID bl2,
rb2 RADIOBUTTON GROUP ab MODIF ID bl2,
rb3 RADIOBUTTON GROUP ab MODIF ID bl3.
INITIALIZATION.
Populate list box values
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
AT SELECTION-SCREEN OUTPUT.
Set list box with value
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
Control the display of screen components
LOOP AT SCREEN.
IF ps_parm = 1.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 0.
ELSEIF screen-name = 'RB3'.
screen-invisible = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = 2.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 1.
ELSEIF screen-name = 'RB3'.
screen-invisible = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = space.
rb1 = 'X'.
clear: rb2,rb3.
IF screen-name = 'RB1' OR screen-name = 'RB2' OR
screen-name = 'RB3'.
screen-invisible = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABC'.
ENDIF.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
And use:
AT-SELECTION-SCREEN on value request for p_yyyy.
if p_xxxx-key is not initial..
get the values required for second parameter...or listbox..
endif..
similarily for 3rd listbox also! -
How to add text dynamically in Tree view list box
CS3/WIN<br />hi,<br />I am new in plugin development.<br />I have a Tree View List box on a dialog.<br />b I don't want to display text when i load the plugin.<br />b I want to insert text data when i click on "Insert" button on dialog. <br />I have defined Adapter,Mgr,Observer for list box.it is working fine when i want to display data at loading time itself.but not when i click on insert button.<br />b In dialog observer i have defined this but it is not working<br /><br />b Dialog Observer::Update<br /><br />InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />IControlView* Grid = panelControlData->FindWidget(kESSGridTVWidgetID);<br />InterfacePtr<IStringListControlData> listControlData(Grid,UseDefaultIID());<br />if (theSelectedWidget == kESSInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{<br />listControlData->AddString(strText,kESSListBoxTextWidgetID); <br />}<br /><br />b it is showing error <br />b operator new returning nil for an allocation size of 486022320 bytes<br />(..\..\..\source\components\memoryallocator\PMNew.cpp (552))<br />b Memory allocation failure<br />(c:\development\cobalt\source\public\includes\K2Allocator.h (131))<br />can any one help to get this..<br />Thanks.
How to populate list in tree view dynamically
Hi,
I am new to Indesign Plugin creation.
I want to create list in tree view dynamically.
I tried wlistboxcomposite sdk sample in indesign cs4.
I have some doubts in this.
1. Can i write my own method in WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter
If it's possible how can i call this method.
2. In this example they populating static string in constructor like this
WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){
K2Vector<PMString> lists;
for (int32 i = 0; i< 12; i++){
PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_bac k(name);}
InterfacePtr<IStringListData> iListData(
this, IID_ISTRINGLISTDATA);}
and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can
i achieve this.
Pls do needful.
Thanks
Arun -
Acquire data from a tab delimited file using a popup dialog object on a stamp
I am trying to import data from a tab delimited file using a popup dialog object on a stamp. I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
My problem is understanding how to bring the data into the dialog object from the file.
I don't want to plagiarize his book--so am electing at this time not to show my code. The script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down. When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
I have searched the forums, and also the JavaScript reference. There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
Any help would be greatly appreciated! i have been trying to work on this for several months now.Karl
Thank you for getting back with me!
In answer to your questions:
1. Your trusted function is not a trusted function. Did you put this
function into a folder level script so that it will get executed at system
startup?--
yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
2. The script cannot find your tab delimited data file, or it cannot
extract the data. Did you add the data file in the correct location? The
location from the script in the book would be c:\mydata\Contacts.txt
Yes--the file is in the same path as the book.
Below is my code that references the file.
var cPath = "/c/mydata/Contacts.txt";
the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
Also, the name and email address need to be separated by one Tab character.
They are.
3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
So, check that you are not getting any errors in the JavaScript console
(Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
location
When I run in the java script console--and I just run the script on the stamp,
it says
TypeError: event.source is null
17:Console:Exec
undefined
When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed. When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
Thank you
Message was edited by: tdjohnson7700 -
How to get the selected value/key of a drop down list box in webdynpro Java
Dear SDN Members,
I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
Can any one put here the code part relating to this.
Your help will be awarded.
Thanks in advance,
Regards,
Sireesha.BHi Sireesha,
You want to display value based on the key selected in dropdown list. If you want to do like that
1) Create a context attribute for ex: key_value
2)In the properties of the attribute select the calculated as true.
3)It will create getter and setter methods for your attribute.
4)Go to implementation add the following code in getter method of your attribute
String attributeName = IPrivateCreate.IContextElement.KEY;
//KEY is your dropdown key attribute not the value attribute.
IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
Object key = element.getAttributeAsText(attributeName);
return valueset.getText(key);
Regards
Suresh
Maybe you are looking for
-
Edit in Photoshop CS4... does not open the selected file.
Sorry if this is an old topic, but I can not seem to find the answer and I was hoping someone here might know. When in Lightroom (2.2 or 2.3) if I select "Edit in Photoshop CS4..." or any of those dropdown commands, Photoshop opens....and that is it.
-
I have E71 nokia phone. my problem is, the phone keeps asking me about the password of any access point i have installed. for ex. , i want to connect to check my mails, it asks me about the preferable network, i select one of the defined networks, t
-
Inbound calls getting answered automatically in Cisco CME
Hi All.... Please advise me the reason, why the inbound calls to CME got answered automatically.? I am mentioning the call handling scenario here with.. Trunk Type : FXO Connection PLAR to physical extension(200) timeouts call-disconnect 1 timeout
-
Hi Guys, Do you know of any workarounds we could use to build a repost planning function on a multiple planning area in SEM BPS. I know you cant normally do this but can this be achieved through using a planning function but can we achieve this passi
-
HP Deskjet 3512 - Can't enable ePrint
Hi, We just bought the printer over the weekend. Set it up yesterday. We have no problems printing through USB or wireless. The ePrint can't be enabled by the Setup Assistant or on the printer itself. Message kept popping out saying that proxy addres