Viewing a directory in a list box

Hi, I am new to java, so dont be to harsh.
I am using J Builder 5.
I wish to view a directory in a list box, when a button is pressed.
The button should bring up a dialog box to accept user input.
I have already created the frame and button, but I dont know how to
get the button to display the directory in the list box.
I would be grateful of any help.
John.
Here is my code so far:
FRAME1.java
==========
package coursework;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame1 extends JFrame {
JPanel contentPane;
BorderLayout borderLayout1 = new BorderLayout();
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
JPanel jPanel3 = new JPanel();
JPanel jPanel4 = new JPanel();
private Button setdir, exit, notes, all, pics, movies, music;
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JButton jButton3 = new JButton();
JButton jButton4 = new JButton();
GridLayout gridLayout1 = new GridLayout();
JButton jButton5 = new JButton();
JButton jButton6 = new JButton();
JButton jButton7 = new JButton();
JTextArea jTextArea1 = new JTextArea();
JScrollPane jScrollPane1 = new JScrollPane();
/**Construct the frame*/
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
/**Component initialization*/
private void jbInit() throws Exception {
//setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setForeground(Color.lightGray);
this.setSize(new Dimension(415, 350));
this.setTitle("Media Catalogue");
Button jbutton1 = all;
Button jbutton2 = pics;
Button jbutton3 = music;
Button jbutton4 = movies;
Button jbutton5 = exit;
Button jbutton6 = setdir;
Button jbutton7 = notes;
jButton1.setMnemonic('0');
jButton1.setText("All");
jButton2.setText("Pictures");
jButton3.setText("Music");
jButton4.setText("Movies");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton5_actionPerformed(e);
jPanel2.setLayout(gridLayout1);
gridLayout1.setRows(4);
gridLayout1.setColumns(1);
gridLayout1.setHgap(8);
gridLayout1.setVgap(2);
jButton5.setText("Exit");
jButton6.setText("Set Root Directory");
jButton7.setText("View Notes");
jTextArea1.setBackground(UIManager.getColor("text"));
jTextArea1.setText("Multi Media Catalogue");
contentPane.add(jPanel2, BorderLayout.EAST);
jPanel2.add(jButton4, null);
jPanel2.add(jButton3, null);
jPanel2.add(jButton2, null);
jPanel2.add(jButton1, null);
contentPane.add(jPanel3, BorderLayout.SOUTH);
jPanel3.add(jButton5, null);
jPanel3.add(jButton6, null);
jPanel3.add(jButton7, null);
contentPane.add(jPanel4, BorderLayout.WEST);
contentPane.add(jPanel1, BorderLayout.NORTH);
jPanel1.add(jTextArea1, null);
contentPane.add(jScrollPane1, BorderLayout.CENTER);
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton6_actionPerformed(e);
/**Overridden so we can exit when window is closed*/
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton5_actionPerformed(ActionEvent e) {
System.exit(0);
void jButton6_actionPerformed(ActionEvent e) {
APPLICATION1.java
=================
package coursework;
import javax.swing.UIManager;
import java.awt.*;
public class Application1 {
boolean packFrame = false;
/**Construct the application*/
public Application1() {
Frame1 frame = new Frame1();
//Validate frames that have preset sizes
//Pack frames that have useful preferred size info, e.g. from their layout
if (packFrame) {
frame.pack();
else {
frame.validate();
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
/**Main method*/
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
catch(Exception e) {
e.printStackTrace();
new Application1();
}

I am not quite sure if this is what you are looking for, but I was doing stuff with listing directories a while ago, and this is how I did it.
When the user changed directory on the GUI, I called a function called listDirectory(), which changed the contents of a JTable to be the details of the files in that directory, the following is the listDirectory function:
private void listDirectory()
File flDirectory = new File(strWorkingDir);
ExtensionFilter udtAllowedFiles = new ExtensionFilter("*.*");
udtAllowedFiles.setConstraints(ExtensionFilter.FILES_ONLY);
String [] strListFiles = flDirectory.list(udtAllowedFiles);
strDirContents = new String[strListFiles.length][3];
Vector vctCheckedOutFiles = udtParent.getLockedFiles(strWorkingDir);
for(int i=0; i<strListFiles.length; i++)
/*add the file information to the strDirContents array*/
jtlListing.setModel(new DefaultTableModel(
strDirContents,
new String [] {"Name", "Type", "Last Modified"}
Note, the ExtensionFilter implements the class FilenameFilter.
You should be able to use a JList instead of the JTable, if that is what you need.
Any other questions, or if this doesn't answer your query, let me know,
S

Similar Messages

  • Multiple List Box showing Duplicate Options in Existing Form Library forms.

    Good day.  I currently have an InfoPath 2010 form library template that has a view containing 4 multiple selection list boxes.  These list boxes get their values from a hidden view that contains 4 repeating tables in which I've set default values
    for Value and Display name to populate the multiple selection list boxes.
    The issue I am having is this: When adding new options to the repeating tables through the Default Values option window and publish, new forms display the new selection options successfully, while existing forms in the library when opened are displayed duplicates
    of the first default value in the table in the place of the new options. (Example, Create Data[display] - 10[value] is displaying 4 times after adding 3 new options to the characteristics table that contains Create Data as it's first row item.)
    When comparing the .XML of a new form to an existing form, groupX in this case shows all options in the new form .XML, but shows the duplicates in the .XML of an existing .XML file.
    Is there a way to resolve this issue so that existing documents will display the proper selection options instead of the duplicates?  I'd like to note that another list box had a value added and it displayed the value properly when published in both
    new and existing forms.
    Thanks!

    Hi Hemendra:
    There are no rules on Section A.
    Two out of three forms used so far by the users have these problems.
    We did extensive trending study on all the submitted forms on both where the submit was successful and ones with Section A frozen up. Also, requested a user to submit a few forms per our instructions on different browsers.  Even though there are some
    forms in the past which could be claimed as success has some attachment uploaded to the Section A of the form, currently every time an attempt by any usetr to attach a smallest document the section A, it wipes out all the existing completed fields and freezes
    up all the rest of the controls of that section and not any other part of the form.
    Thanks,
    SRA
    SRAEngineer

  • ICal for iPhone. View all events as a list without having to type into the earth box.

    iCal for iPhone. View all events as a list without having to type into the earth box.
    On the previous software version I used to be able to view all my calendar events as a list by clicking on the magnifying glass. Now you have to type into the search dialog box for a list to populate. This is very frustrating and annoying because I much prefer the list format to populate everything unless I specify what I am looking for into the search box. Is there a way to view all the events as a list without having to type anything into the search box?

    And you are aware of the possible options for listing the months and having an optional export value for each month.
    For listing the months, you can use a number, a 3 character string, or the full name.
    For the export value, the full name, the 3 character value, the 1-2 number, or the 0-11 JavaScript value.
    I would look at deciding how you want to populate the drop down box and build a one page form with just this field. You can then insert that page into a PDF and copy the field as needed and then delete the inserted page. Or you could create an FDF file to create the drop down box.

  • 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

  • List Box View - Change Number of Columns

    I'm using Box View to display a couple of list columns (Logo, Org Name). This gives me a very nice "dashboard" view of the list which I can drill into using the Org Name link. I've already figured out how to resize the webpart in SPD to get a tiled
    look.
    The Problem: I'd like to display 4-5 columns not just the 2 that Box View supports OOB
    Solution ???

    ISJ - I created a new view on an existing SharePoint list that had Logo and Organization fields already. New "Logo View" shows only those 2 columns. I selected Box View No Labels as the Style - giving
    me the "tiled" look I need
    Unable to upload screenshot - getting message re: until Microsoft can verify my account
    The view is simple - As "illustrated" below
    LOGO
    Org Name (link)
    I'd like to get 3 more columns across horizontally
    Thanks so much in advance for your reply :)

  • How to list files from directory in list box?

    Hi all,
    Here is what I want to implement: I have several pattern files that'd
    be sent to special motor controller. What I want is: display these
    files in the list box on the interface, so that user can click on the
    file he wants, then run the program, and this file will be the input
    to my controller.
    Thank you!

    lv 6.1 attached.
    cheers,
    ~j5
    2006 Ultimate LabVIEW G-eek.
    Attachments:
    Get_File_Names.vi ‏54 KB

  • When I login to my bank, I get the message: 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. Have new MacBook Air with Yosemite. How to solve this problem?

    When I try to login to the website of my bank, I get the following error message:
    403 - Forbidden: Access is denied.
    You do not have permission to view this directory or page using the credentials that you supplied.
    I have a new MacBook Air with OS Yosemite installed.
    What is the problem and how can I solve it?

    Some websites require a special client certficate for access. If you don't have that certficate, you'll have to contact the site operator to find out how to get one.
    Sometimes the problem is caused by a web server that is configured to request an optional client certificate. Safari treats the request as mandatory. In that case, other browsers such as Firefox and Chrome may be able to connect to the site, because they ignore the request.
    The first time you were prompted for a certificate, you may have clicked through a dialog that requested access to the Apple certificate in your keychain that is used to secure the iMessage service. In that case, you may be able to regain access to the site in Safari by doing as follows.
    Back up all data.
    Double-click anywhere in the line below on this page to select it:
    com.apple.idms.appleid.prd
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Paste into the search field in the Keychain Access window by clicking in it and pressing the key combination command-V. An item may appear in the list of keychain items. The Name will begin with string you searched for, and the Kind will be "certificate."
    Delete the item by selecting it and pressing the delete key. It will be recreated automatically the next time you launch the Messages or FaceTime application.
    The next time you visit a site that prompts for an optional client certificate, cancel out of the prompt. You may have to do this several times before the server stops asking.
    Credit for this idea to Christian Braukmueller of SAP.

  • How to get flagged messages in to tasks or alternatively view another users to do list.

    If someone could just help me out I would be extremely appreciative.
    2 of us work in one mail box together called admin. when one of us is away we like to use the flags to create follow ups for each other on certain email items.
    Firstly, I can only see my main accounts to do list
    Secondly, when I flag a contact / message / anything in fact, in any mailbox it only appears in their respective to do lists and not in their tasks. Thus I cannot see what I have flagged for them at a glance as I can not find a way to view other peoples
    to do list. i.e. neither of us can see any of the flags in the shared mailbox we use (admin) unless we log in under a different profile, which is troublesome as it takes way to long to switch back and forth.
    I presently use colour categories to delegate who is currently in charge of answering certain emails and use custom flags to note what we are waiting for in particular to a certain email and then mark a tick when it has been dealt with. Simple system but
    not currently working in full due to the follow up flags not appearing in tasks.
    This also affects my task synching on my mobile where once again it only shows what is in tasks... i.e stuff I have physically typed in outlook rather than flagged content; mails, contacts etc.
    Any ideas how to get the follow up flags appearing in tasks or an ability to see other peoples to do lists... the first is more preferable but I will take what I can.
    Kindest Regards
    Woody

    Just add the 'admin' mailbox as additional account in Outlook, as opposed to additional mailbox (i.e. don't add it from Accounts Settings -> More settings -> Advanced, but from File -> Add account instead).
    It will then show flagged items and tasks from all accounts in the 'To-do' list.

  • 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.B

    Hi 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

  • You do not have permission to view this directory or page using the credentials that you supplied.You do not have permission to view this directory or page using the credentials that you supplied.

    Hi,
    I update recently my OS to Yosemite and decided to use Safari again as my web browser (I was using Chrome). Some of the sites I need to access for professional reasons are not available with safari. I receive the message: "403 - Forbidden: Access is denied.You do not have permission to view this directory or page using the credentials that you supplied.". I believe there is a pattern here, they are all sites publish with IIS with SSL and build with ASP.NET.
    I can access them with Chrome (on OS X) or with Internet Explorer (with my Windows VMs).
    I've already cleared all saved passwords, cookies, history, etc...the problem remains. I'm sure this is a known problem, but all the answers I've found on the internet were for things like DNS and unavailability of the site. The sites are working fine and I can access them with Chrome.
    Can anybody help me? An explanation would also be nice :-) Something to do with Microsoft Authentication methods ?
    Thanks,

    Some websites require a special client certficate for access. If you don't have that certficate, you'll have to contact the site operator to find out how to get one.
    Sometimes the problem is caused by a web server that is configured to request an optional client certificate. Safari treats the request as mandatory. In that case, other browsers such as Firefox and Chrome may be able to connect to the site, because they ignore the request.
    The first time you were prompted for a certificate, you may have clicked through a dialog that requested access to the Apple certificate in your keychain that is used to secure the iMessage service. In that case, you may be able to regain access to the site in Safari by doing as follows.
    Back up all data.
    Double-click anywhere in the line below on this page to select it:
    com.apple.idms.appleid.prd
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Paste into the search field in the Keychain Access window by clicking in it and pressing the key combination command-V. An item may appear in the list of keychain items. The Name will begin with string you searched for, and the Kind will be "certificate."
    Delete the item by selecting it and pressing the delete key. It will be recreated automatically the next time you launch the Messages or FaceTime application.
    The next time you visit a site that prompts for an optional client certificate, cancel out of the prompt. You may have to do this several times before the server stops asking.
    Credit for this idea to Christian Braukmueller of SAP.

  • How Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Select multiple items from a list box as values for a parameter of crystal report and Oracle procedure

    -  I have a  Product list box (asp.net) used as multiple selected values for  a parameter. 
    - The Product ID is defined in the Oracle procedure as NUMBER data type. 
    -  In my crystal report, I have a parameter field allow multiple values as p_product_id type as Number.  This is the code in my Record Selection Formula for the report:
    ({?p_product_id}[1] = -1 OR {Procedure_name.product_id} in {p_product_id})
    -  In C#, this is my code
    List<decimal?> productUnit = new List<decimal?>();
    int counter = 0;
    decimal prod;
    for (int i = 0; i < lstProducts.Items.Count; i++)
                  if (lstProducts.Items[i].Selected)
                                if (decimal.TryParse(lstProduct.Items[i].Value, out prod))
                                    productUnit.Add((decimal?)prod);                              
                                    counter++;
           if (counter == 0)
                       productUnit.Add(-1);                      
    ReportingDAO rDataFactory = new ReportingDAO();
    retVal = rDataFactory.GetProductReport(productUnit);
    public CrystalDecisions.CrystalReports.Engine.ReportDocument GetProductReport(List<decimal?> productUnit)
              CrystalDecisions.CrystalReports.Engine.ReportDocument retVal = new rptProductDownload();
              ReportLogon rptLog = new ReportLogon();
             rptLog.Logon(retVal, "RPT_PRODUCT_DOWNLOAD");
             retVal.SetParameterValue("p_product_id", productUnit); 
    I keep having the "Value does not fall within the expected range" when I debug.  My question is, is the data type I used for procedure/Crystal report/ and C# correct ?  I always have problem with the data type.  Any help would be
    appreciated
    Thank you

    Hi progGirl,
    Thank you for your post, but Microsoft doesn't provide support for CrystalReport now. Please post your question in SAP official site here:
    http://forums.sdn.sap.com/forum.jspa?forumID=313
    Thank you for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to add data into a List box

    CS3 SDk:Windows<br /><br />Hi all,<br />I am trying to add  data into a basic List box in CS3??<br /><br />// .fr<br />GenericPanelWidget<br />     (<br />     // CControlView properties<br />     kInvalidWidgetID, // widget ID<br />     kPMRsrcID_None, // PMRsrc ID<br />     kBindNone, // frame binding<br />     Frame(0,0,250,90) // left, top, right, bottom<br />     kTrue, // visible<br />     kTrue, // enabled<br />     // GroupPanelAttributes properties<br />     "", // header widget ID<br />     { <br />     <br />     WidgetListBoxWidgetN<br />     (<br />     kWFPListBoxWidgetID, kSysListBoxPMRsrcId, // WidgetId,RsrcId<br />     kBindAll, // Frame binding<br />     Frame(0,0,250,90) // Frame<br />     kTrue, kTrue, // Visible, Enabled<br />     1,0, // List dimensions<br />     19, // Cell height<br />     1, // Border width<br />     kFalse,kTrue, // Has scroll bar (h,v)<br />     kTrue, // Multiselection<br />     kTrue, // List items can be reordered<br />     kTrue, // Draggable to new/delete buttons<br />     kFalse, // Drag/Dropable to other windows<br />     kTrue, // An item always has to be selected<br />     kFalse,// Don't notify on reselect<br />     kFalse, <br />     {               <br />     }     <br />                    <br />),<br />},<br />),<br /><br />//-------ID.h--------<br />DECLARE_PMID(kWidgetIDSpace, kWFPListBoxWidgetID, kWFPPrefix + 2)<br /><br />//observer.cpp-----------WFPDialogObserver::Update<br /><br />//get currently selected/active widget <br />WidgetID theSelectedWidget = controlView->GetWidgetID();<br /><br />// ist it the text edit field? <br />if (theSelectedWidget == kWFPInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{ <br /><br />IControlView* listBox = panelControlData->FindWidget(kWFPListBoxWidgetID);<br /><br />InterfacePtr<IListControlData> listControlData(listBox, UseDefaultIID()); <br /><br />//Insert the string into listbox <br />PMString strText = dialogCtrl->GetTextControlData(kWFPTextEditBoxWidgetID); <br /><br />// obviously there can't be a translation for text entered by user <br />strText.SetTranslatable(kFalse);<br />listControlData->Add(strText,kWFPTextEditBoxWidgetID); <br />dialogCtrl->SetTextControlData(kWFPTextEditBoxWidgetID, ""); <br />break;      <br /><br />I am not able to Add items into list box.<br /><br />I tried based on Discussion <br />http://www.adobeforums.com/webx/.3bc43877<br /><br />but not able to locate  SDKListBoxHelper file .it is not available in SDK.<br /><br />Please ,<br />Tell me Where I am going wrong.<br /><br />Thanks,<br />Adil

    resource VSPDialogWidget (kSDKDefDialogResourceID + index_enUS)
         __FILE__,
         __LINE__,
         kVSPDialogWidgetID, // WidgetID
         kPMRsrcID_None, // RsrcID
         kBindNone, // Binding
         Frame(5,0,491,266) // Frame (l,t,r,b)
         kTrue,
         kTrue, // Visible, Enabled
         kVSPDialogTitleKey, // Dialog name
              DefaultButtonWidget
                   kOKButtonWidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(9,234,89,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefOKButtonApplicationKey,  // Button text
              CancelButtonWidget
                   kCancelButton_WidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(394,234,474,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefCancelButtonApplicationKey, // Button name
                   kTrue,  // Change to Reset on option-click.
              WLBCmpListBox   //Tree view
                   kWLBCmpListBoxWidgetID, kPMRsrcID_None,     // WidgetId, RsrcId
                   kBindAll,                                                       // Frame binding
                   Frame(299,49,475,170)           // Frame
                   kTrue, kTrue,                                             // Visible, Enabled
                   kTrue,                               // EraseBeforeDraw
                   kInterfacePaletteFill,           // InterfaceColor
                   kHideRootNode | kDrawEndLine,     // Options. Display root node
                   kFalse,          // Use H Scroll bar
                   kTrue,          // Use V scroll bar
                   20,               // fVScrollButtonIncrement
                   20,               // fVThumbScrollIncrement
                   0,               // fHScrollButtonIncrement
                   0,               // fHThumbScrollIncrement
                   2,               // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
                   kFalse,          // Allow children from multiple parents to be selected
                   kTrue,          // Allow discontiguous selection
                        //The tree view is dynamically created.          
    // added to support the list elements in the list box
    resource LocaleIndex (kWLBCmpListElementRsrcID)
         kViewRsrcType,
              kWildFS, k_Wild, kWLBCmpListElementRsrcID + index_enUS
    resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)
         __FILE__, __LINE__,
         kWLBCmpListParentWidgetId, kPMRsrcID_None,     // WidgetId, RsrcId
         kBindLeft | kBindRight,               // Frame binding
         Frame(0, 0, 194, 20),               // Frame
         kTrue, kTrue,                         // Visible, Enabled
         "",                                        // Panel name
                   // Just a info-static text widget with about-box text view to get white bg.
              WLBCmpTextWidget
                   kWLBCmpTextWidgetID, kPMRsrcID_None,          // WidgetId, RsrcId
                   kBindLeft | kBindRight,                                        // Frame binding
                   Frame(45,1,194,18)                                             // Frame
                   kTrue, kTrue, kAlignLeft,kEllipsizeEnd                    // Visible, Enabled, Ellipsize style
                   "",                                                                 // Initial text
                   0,                                                                 // Associated widget for focus
                   kPaletteWindowSystemScriptFontId,                         // default font
                   kPaletteWindowSystemScriptHiliteFontId,                    // for highlight state.
    If you still got problems, post you email here - I'll send you the complete project/code then.
    -Marc

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How to increase the width of the drop down list box in SSRS multi value parameter

    Hi,
    I am using SSRS 2012. I have a parameter, which accepts multi value.
    The width of the drop down list box is very small, and the user need to scroll to the right to view the complete view of the content in the list box. But, if I don't use multi value then the length is good.  Kindly suggest how to I increase the width
    of the list box when it set to multi value parameter.
    Thanks in advance,
    Mahalengam Arumugam

    Hi Mahalengam,
    After testing the issue in my local environment, I can reproduce it. When the values for a single parameter are too long, the drop-down list of the parameter will automatically enlarge to an appropriate size. While the values for a multiple parameter are
    too long, we need to scroll to the right to view the complete view of the content in the list box in SSRS 2008. But in SSRS 2008R2 and SSRS 2012, we can directly drag the black control at the bottom of the list box to control the size.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Hi Katherine,
    Thanks for your reply. I understood we need to drag the list box to a maximum size to view the contents.
    But, this seems an additional task, i know this is a limitation in the current version of SSRS and hope it will be resolved in the next versions.
    Thanks for your efforts,
    Mahalengam Arumugam

Maybe you are looking for

  • How do I run a non-server program on Windows Server 2008

    I currently run a synchronization software application on my desktop in order to backup and synchronize over 600GB of data.  I would like to install this on our server, which runs Windows Server 2008, but the software does not provide for installatio

  • Import/export in SRM 7.01

    Dear colleagues, We intend to implement SRM 7 We have requirement for implement Import/export process in the purchase order. The purpose is to the costs of transportation, shipments and taxes that include in the purchase process. We want to see this

  • How do I get my mac to require password for shutdown

    I have a mac book air running OS X 10.8.5. I want my mac to require a password when shutting down. Is that possible? I've googled it but I can't find anything. I want to be the only one that can shut down my computer on the button, som that others ca

  • Word 365 not lauching under administrator account but works under guest account

    Hello, Problem: Word 365 does not open and wants to repair itself. All other office programs work fine. Strangely Word works fine under guest account. Did the repair (brief, complete). Uninstalled office (with the FixIt and O15CTRRemove) and reinstal

  • E71 (New Firmware) 300.21.012-------Slow SMS typin...

    SMS error on new firmware Press new message, Type appx 80 character then continue press new letter the system being slow and word appears after the 1-2 second..