List box multiselect resulting in pulsating cursor

I followed the coding suggestion found in the following Topic link to create a multiselect Listbox that saves all its selections to the submitted XML output file.
http://www.adobeforums.com/cgi-bin/webx/.3bbda6ea/9
In the Listbox initialize event, I use this code:
this.ui.choiceList.open = "multiSelect";
this.rawValue = "-1";
In the invisible Textbox preSubmit event, I use this code:
this.rawValue = Listbox1.rawValue;
However, in Designer's PDF Preview, as well while testing in Acrobat 7, the moment I have selected two or more items in the Listbox with the Ctrl key AND THEN click into any other field in the form, the cursor rapidly pulsates between either the text cursor and the hourglass, or the hand cursor and the hourglass.
I can continue to fill out the form just fine and submit by email, and all the selected data is preserved in the XML output -- however, the pulsing cursor will totally unnerve the users.
Does anyone have any idea why it does this? This behavior doesn't happen in the example that I borrowed it from.

[email protected] wrote:
> Note that this will only work if the text and value assigned to an item in the list box are the same as well as only work in the single-selection case.
>
> xfa.event.newText will only be set to the item text of the item which was clicked by the mouse. If an item's value differs from its text (e.g. you have an item named "Vegetables" with a value of "1"), xfa.event.newText will be set to "Vegetables", not "1". Although you can determine that the value of the new selected item is "1" by using this.boundItem(xfa.event.newText), you can't determine the value of all items that were selected.
>
> In a multi-select list box, simply using xfa.event.newText won't work in all cases because even when the user shift-clicks an item to select all items from the last selected item to the item clicked, xfa.event.newText will still only be set to the item that was clicked as opposed to being, for example, a newLine-delimited string of all items that were selected as a result of the shift-click.
>
> Although we shouldn't have to be calling this.saveXML() prior to retrieving this.rawValue, it's the only way we've found to successfully retrieve the value of all items that were selected at the time of the Change event.
>
> Stefan
> Adobe Systems
Sorry, I misunderstood the problem. I think the real issue here is that
multiselect list boxes are not fully supported. Be careful when using
these. If you try to export xml data from the form, you will get mixed
results. Sometimes it exports all of the values, sometimes it exports
one of the values, and sometimes it exports some of the values...none of
which seem to match what was actually selected. At least this is what I
experienced in limited testing. Proceed with caution!!!
Justin Klei
Cardinal Solutions Group
www.cardinalsolutions.com

Similar Messages

  • Multicolumn List Box - Amazing result

    Hi Everybody,
    Can anybody tell me why Black line is appeared on Horizontal Scroll Bar as attached in file. It happens sometimes only so I am egar to know reason.
    Thanks in Advance.
    ii

    Please refer this attachment in first post.
    Attachments:
    Amzing Result of Horizotntal Scroll Bar.doc ‏24 KB

  • The method of leaving cursor at selecting item of list box.

    Hello.
    Pleas let me ask about the subject!!!
    Concerning the screen by web-dynpro, I have a problem that when I select one listbox after selecting another listbox, the screen moves up to the top automatically.
    I would like to prevent from above moving.
    Could anyone specialist please tell me how leaving cursor at setelcting item of the list box.
    Thanks!!!

    Hi...
    there are two events which have been used, one is doubleclick event and the other one is on selecting the item from the list and clicking on OK button(this will be the most frequently used function, i cannot use event target event for this OK button... ) . I have attached the screen shot. Please have a look at it and let me know how can i achieve that...
    I can use custom event, but the main problem is that the inline itemeditor's details are not accessible in the code.... I can access some function from within the inline itemeditor combo box using outerDocument.myFunction() (this is something like GET). Is there a similar way, to SET the data into this itemeditor?

  • Measurement Results in Execution list box

    Anyideas or reliable procedures on adding measurement results to the existing pass/fail line in the execution display list box ?
    Test Engineering
    Empower RF Systems Inc.

    Hi,
    I guess as long as you put in the preconditions to handle those steps that dont have your extra properties and resize your list box to handle the extra information. You should be alright.
    I have used the example in the Resource Library | TestStand | Step Types | Custom Steps Types - adding limits to the description in the Sequence Display without any problems.
    Ray.
    Regards
    Ray Farmer

  • Multiselect dependant list box based on the database

    i have to develop the jsp page with set of 3 list box which should display a field of a table. Based on the event over the list box1 listbox2 should be updated based on the selected item. For example when u click india on the list box 1 it should display all the states of india in the listbox two. Since it is multiselect when u choose pakistan the list box2 should display the states of india and pakistan.
    This is my prob i am struggling for this for a long while please help me to solve the problem.
    Thanks in advance.
    I want to complete it before today evening i am also new to the jsp please help me...............

    double post http://forum.java.sun.com/thread.jspa?threadID=659520&tstart=0

  • Getting multiple values from a list box

    Hi,
    I am not able to get multiple selected values from a list box using the getParameterValues(). I used the following code..
    String[] names=request.getParameterValues("lname");
    can anyone tell me what the error is or is there any other way i can get multiple selected values from a list box.
    Thanks
    Satish

    Fragment 1
    This is the JSP Code am using for testing
    <%
    String[] name =request.getParameterValues("D1");
    if(name.length==1)
    String value=name[0];
    Instead of name.lenght==1 try with name!=null
    Fragment 2
    out.println(value);
    replace the above fragment with
    %>
       <%-- print result -->
       <%=name[0]%>
    <%
    Fragment 3
    else
    %>
    The list box D1 is a multiple select list box.
    If it still doesn't work, check that the checkboxes have the same name as well as different values
    <input type="checkbox" name="D1" value="1">
    <input type="checkbox" name="D1" value="2">I hope this helps :-)
    Good luck
    touco
    ps: i want duke

  • 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

  • List Box in ITS template and use of 'FIELD_SET'

    Hello EveryOne,
    I am working in SRM5.0. Can some one guide me, If we can create a List box in custom ITS template. I am trying to use SELECT statement on HTML to create LIst Box. Is this right way to do that?
    Does any one know better way to create a List BOx connected to custom field, that is filled in PAI. We do not have a search help added to this field. So I can not use F4 modules.
    Also does any one know If use of macros 'FIELD_SET' is still allowed in the PBO/PAI  ?
    Really appreciate any help in this regard.

    Dear srivallika,
    first you have do build up an steploop on your dynpro for the it_ccode-bukrs
    AT PBO
    loop at it_ccode cursor g_ccode_cur into wa_cccode.
    my set loopc
    module ccode_loopc.
    endloop.
    Include PBO
    module ccode_loopc.
      g_ccode_loopc = sy-loopc.
    endmodule.
    You only see via DIAG Dialog the displayed rows on the Dynpro.
    So if you only have a steploop of 4 rows -- you only get 4 rows to the wgate.
    Better use the field-set makro.
    AT PBO
    module rfc_fieldset_ccode.
    INCLUDE PBO
    module rfc_fieldset_ccode.
    data: ls_ccode like line of it_ccode.
    data: i type i.
    I'll use deeper structure
      perform rfc_fieldset_ccode.
    but you also can define the code here
    loop at it_ccode into ls_ccode.
         add 1 to i.
         field-set 'INDX'       i i .
         field-set 'BUKRS'   i   ls_ccode-bukrs .
    endloop.
    endmodule.
    Why to do this? The field-set makro (don't forget to include AVWRTCXM at your topinclude) will send the data from internal table via AGATE to the WGATE.
    Here now you can define the dropdown list:
    srivallika, i'll hope i could help you a little. If you have any questions, you won't bother me. ASK!
    With best regards
    Thorsten

  • List Box With Writing Facility

    Hello Experts ,
                            I want to create a list box in selection-screen with input facilty,
                            i.e i should be able write in that list box just in case of parameters , right now
                            i'm able to select values from drop down only .
                            in short it should just work like command field in screen , where we can write t-code
                            or select t-code from drop down .
    Regards
    Ajit

    Hi ajit,
    without logging onto system and creating a sample, I can tell you what online documentation says about [Using a Different Search Key|http://help.sap.com/saphelp_nw70/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]
    READ TABLE itab WITH KEY k1 = f1 ... kn = fn result.
    The search key consists of arbitrary table fields k1 ... kn. If you do not know the name of a component until runtime, you can specify it dynamically as the content of a field n1 ... nn using (n1) = f1 (n2) = f2 .  If n1 ... nn is empty when the statement is executed, the search field is ignored.
    That means that for the READ TABLE statement you should use a number of key specifications not less than the possible maximum and then dynamically fill the key variables and key values.
    Do not forget to clear before you do the next read for another table.
    Hope it works.
    Also, this is SAP NetWeaver 7.0, I think dynamic key specification was not possible earlier.
    Regards,
    Clemens

  • List Box showing Value and Display members?

    Ok this is a CONCEPT problem (the code is not professional, just read it for the concept, though it does compile and run).
    Right, I have asked many people on IRC and no one is giving me a straight answer lol so maybe some professionals can help me.
    I am trying to use a Datasource property for my combobox. This is so I can just pass an entire KeyValue pair with indexes and values to be shown in the listbox.
    Creating the keyvaluepair as a WHOLE and passing that to datasource property works perfectly.
    Creating a keyvaluepair PROCEDURALLY (in a loop or w/e) ends in the datasource property ToString()ing it, list box items show BOTH value AND display members in square brackets as an entire option.
    NOTE: Getting the lsitbox.value results in ONLY the valuemember being returned even though the listbox shows both the valuemembers AND the displaymember? it knows they are different?
    Now, I dont want any alternatives or comments about the quality of the code, all I want to know is WHY is it doing this, it seems compeltely illogical that the same TYPE and Values and can different Effects within the datasource property? Its like it knows
    it was built procedurally?
    Anyway here is some code for reference:
    // Windows Form
    namespace skbtInstaller
    public partial class frmMainWindow : Form
    public frmMainWindow()
    InitializeComponent();
    // coxArmaPath = Combo Box (simple drop down)
    this.cBoxArmaPath.ValueMember = "Key";
    this.cBoxArmaPath.DisplayMember = "Value";
    public void addServerPathItem(String Key, String Value)
    this.cBoxArmaPath.Items.Add(new KeyValuePair<String, String>(Key,Value));
    // This works fine, only the "DisplayMember" is displayed and the "ValueMember" is hidden.
    // This acts differently with the same types???
    public void setServerPathDatasource(List<KeyValuePair<String, String>> source)
    this.cBoxArmaPath.DataSource = new BindingSource(source, null);
    public class skbtServerControl
    private frmMainWindow frmMainWindowHandle;
    public void refreshformWindow()
    // Clear Drop Box (empties drop box)
    this.frmMainWindowHandle.clearPathBox();
    //skbtServerConfig is very simple property object
    foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
    // Populate Drop Box
    this.frmMainWindowHandle.addServerPathItem(pair.Key, pair.Value.getTextualName()); // this works as intended
    // cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
    // This works absolutely fine. ValueMembers are hidden.
    public void refreshformWindowWithSTATICDatasource()
    // Clear Drop Box
    this.frmMainWindowHandle.clearPathBox();
    var pathDataSource = new List<KeyValuePair<String, String>>()
    new KeyValuePair<String, String>("testKey1", "somevalue1"),
    new KeyValuePair<String, String>("testKey2", "somevalue2"),
    new KeyValuePair<String, String>("testKey3", "somevalue3")
    // Populate Drop Box
    this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
    // cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
    // ** HERE IS THE PROBLEM?? **
    // This creates a type that seems different to the above function which works fine...
    public void refreshformWindowWithDatasource()
    // Clear Drop Box
    this.frmMainWindowHandle.clearPathBox();
    var pathDataSource = new List<KeyValuePair<String, String>>();
    //skbtServerConfig is very simple property object
    foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
    pathDataSource.Add(new KeyValuePair<String, String>(pair.Key, pair.Value.getTextualName()));
    // Populate Drop Box
    this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
    // cBox gets items like [asjAETJQ5785d45,Some Display Text], [asawfgQ5785d45,Some Display Text], [asjAhrrQ5785d45,Some Display Text]
    // ????? surely this function should act exactly like the function above??
    Thanks!
    (I have posted on codeproject too, will condense any replies).
                 

    Thanks Michael!
    I did debug this and it turns out when i set a new BindingSource to the combo box, indeed the DisplayMember gets reset. Oddly though, the ValueMember stays the same.
    I have fixed this with setting the Members before every new bindingSource is set to the combobox, strange that only the displaymember is reset?
    For reference, the new resolved code: (this compiles albeit with designer components placed)
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace etstapp1
    public partial class Form1 : Form
    private skbtServerControl sc;
    public Form1()
    InitializeComponent();
    this.sc = new skbtServerControl(this);
    // coxArmaPath = Combo Box (simple drop down)
    this.cBoxArmaPath.ValueMember = "Key";
    this.cBoxArmaPath.DisplayMember = "Value"; // This doesnt seem to stick after the first datasource set??
    public void addServerPathItem(String Key, String Value)
    this.cBoxArmaPath.Items.Add(new KeyValuePair<String, String>(Key, Value));
    // This works fine, only the "DisplayMember" is displayed and the "ValueMember" is hidden.
    // This acts differently with the same types???
    public void setServerPathDatasource(List<KeyValuePair<String, String>> source)
    this.cBoxArmaPath.DisplayMember = "Value"; // fix datasource problem
    this.cBoxArmaPath.ValueMember = "Key"; // fix datasource problem
    this.cBoxArmaPath.DataSource = new BindingSource(source, null);
    public void clearPathBox()
    if(this.cBoxArmaPath.DataSource == null){
    this.cBoxArmaPath.Items.Clear();
    else
    this.cBoxArmaPath.DataSource = null;
    private void btnStatic_Click(object sender, EventArgs e)
    this.sc.refreshformWindowWithSTATICDatasource();
    private void btnNormal_Click(object sender, EventArgs e)
    this.sc.refreshFormWindow();
    private void btnDynamic_Click(object sender, EventArgs e)
    this.sc.refreshformWindowWithDatasource();
    public class skbtServerControl
    private CoreConfig CoreConfig;
    private Form1 frmMainWindowHandle;
    public skbtServerControl(Form1 f){
    this.frmMainWindowHandle = f;
    this.CoreConfig = new CoreConfig();
    public void refreshFormWindow()
    // Clear Drop Box (empties drop box)
    this.frmMainWindowHandle.clearPathBox();
    //skbtServerConfig is very simple property object
    foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
    // Populate Drop Box
    this.frmMainWindowHandle.addServerPathItem(pair.Key, pair.Value.getTextualName()); // this works as intended
    // cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
    // This works absolutely fine. ValueMembers are hidden.
    public void refreshformWindowWithSTATICDatasource()
    // Clear Drop Box
    this.frmMainWindowHandle.clearPathBox();
    var pathDataSource = new List<KeyValuePair<String, String>>()
    new KeyValuePair<String, String>("testKey1", "somevalue1"),
    new KeyValuePair<String, String>("testKey2", "somevalue2"),
    new KeyValuePair<String, String>("testKey3", "somevalue3")
    // Populate Drop Box
    this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
    // cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
    // ** HERE IS THE PROBLEM?? **
    // This creates a type that seems different to the above function which works fine...
    public void refreshformWindowWithDatasource()
    // Clear Drop Box
    this.frmMainWindowHandle.clearPathBox();
    var pathDataSource = new List<KeyValuePair<String, String>>();
    //skbtServerConfig is very simple property object
    foreach (KeyValuePair<String, skbtServerConfig> pair in this.CoreConfig.getServerConfigList())
    pathDataSource.Add(new KeyValuePair<String, String>(pair.Key, pair.Value.getTextualName()));
    // Populate Drop Box
    this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
    // cBox gets items like [asjAETJQ5785d45,Some Display Text], [asawfgQ5785d45,Some Display Text], [asjAhrrQ5785d45,Some Display Text]
    // ????? surely this function should act exactly like the function above??
    public class CoreConfig
    public Dictionary<String, skbtServerConfig> getServerConfigList(){
    return new Dictionary<string, skbtServerConfig>()
    {"somekey1", new skbtServerConfig("somename1")},
    {"somekey2", new skbtServerConfig("somename2")}
    public class skbtServerConfig
    private String name;
    public skbtServerConfig(String name)
    this.name = name;
    public String getTextualName()
    return this.name;
    Talking with someone it seems logical that every time I set a new BindingSource the component will not know if I want to keep the same member values so it resets them, but why it only resets displaymember? very strange to me.
    Thanks again.

  • How do i change this code so when i select a track in the list box it goes into the text box

    Public Class Form3
    Dim numofrecords As Integer
    Dim NextID As Integer
    Dim RecordNumber As Integer
    Private Tableformat As String = "{0,-8}{1,-20}{2,-20}{3,-10}{4,-20}{5,-20}"
    Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    numofrecords = LOF(1) / Len(Tracks)
    If numofrecords = 0 Then
    NextID = numofrecords + 1
    Else
    FileGet(1, Tracks, numofrecords)
    NextID = Tracks.TrackID + 1
    End If
    FileClose(1)
    txtTrackID.Text = NextID.ToString
    End Sub
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    ' Get the song info from the form
    Tracks.TrackID = txtTrackID.Text
    Tracks.Title = txttitle.Text
    Tracks.Artist = txtartist.Text
    Tracks.Genre = txtGenre.Text
    Tracks.Duration = txtduration.Text
    Tracks.era = txtera.Text
    Tracks.Otherinfo = txtBlurb.Text
    Tracks.IsDeleted = 0
    ' write the record to file
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    FilePut(1, Tracks, numofrecords + 1)
    'Close file
    FileClose(1)
    ' add one to the number of records
    numofrecords = numofrecords + 1
    NextID = NextID + 1
    txtTrackID.Text = NextID
    ' place cursor in id box
    txtTrackID.Focus()
    'clear form
    txtartist.Text = ""
    txtduration.Text = ""
    txtera.Text = ""
    txtGenre.Text = ""
    txttitle.Text = ""
    End Sub
    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtartist.Text = ""
    txtduration.Text = ""
    txtera.Text = ""
    txtGenre.Text = ""
    txttitle.Text = ""
    txtTrackID.Text = ""
    End Sub
    Private Sub lstsongs_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstsongs.SelectedIndexChanged
    'get selected record
    RecordNumber = lstsongs.SelectedIndex
    'lblDebug.Text = RecordNumber
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    FileGet(1, Tracks, RecordNumber)
    FileClose()
    'populate the input boxes
    CurrentTracks = Tracks.TrackID.
    txtTrackID.Text = Tracks.ToString
    txtartist.Text = Tracks.Artist
    txtBlurb.Text =
    txtduration.Text = Tracks.Duration
    txtera.Text = Tracks.era
    txtGenre.Text = Tracks.Genre
    txttitle.Text = Tracks.Title
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Close()
    End Sub
    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
    'set the filename
    Filename = "Tracks.dat"
    'open the file
    FileOpen(1, FileName, OpenMode.Random, , , Len(Tracks))
    'check numnber of records in file
    numofrecords = LOF(1) / Len(Tracks)
    'close file
    FileClose(1)
    Tracks.TrackID = numofrecords + 1
    txtTrackID.Text = Tracks.TrackID
    End Sub
    Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click
    'clear list box
    lstsongs.Items.Clear()
    'headings
    lstsongs.Items.Add(String.Format(Tableformat, "Track ID", "Title", "Artist", "Genre", "Duration", "Era"))
    'open file
    FileOpen(1, Filename, OpenMode.Random, , , Len(Tracks))
    ' Add records to list box
    Do While Not EOF(1)
    FileGet(1, Tracks)
    lstsongs.Items.Add(String.Format(Tableformat, _
    Tracks.TrackID, _
    Tracks.Title, Tracks.Artist, Tracks.Genre, _
    Tracks.Duration, Tracks.era))
    Loop
    'close file
    FileClose(1)
    End Sub
    Private Sub lblDebug_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblDebug.Click
    End Sub
    End Class

    Hello,
    Since a ListBox displays text then when you have a selected item simply use the Text property of the ListBox rather than SelectedItem which would be used if the data source was say an object i.e. setting the ListBox DataSource to a DataTable then we would
    cast SelectedItem to a DataRowView but if all you have is text using the ListBox Text property.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • List boxes as filter

    Hi,
    I’m developing an asp page containing a form with two
    dynamically populated list boxes and a submit button. The submit
    button should open up another asp page with results filtered by
    criteria determined by the contents of the 2 list boxes. I can
    populate the list boxes OK but I am not sure about how to use the
    selected values as the filter. Can anyone point me in the right
    direction?
    Thanks,
    Chris

    Select * WHERE IDFieldName <> Variable1 && / OR
    IDFieldName <> Variable2
    You can set your variables in the advanced section of your
    recordset box.
    Check your SQL as the above is just 'pseudo' (I alway shave
    to check SQL,
    for some reaons can never remember it quite right). The
    recordset box will
    help you to find the right way to access your variables -
    URL/Form/Session,
    etc.
    HTH,
    Jon
    "Chris_HSL" <[email protected]> wrote in
    message
    news:e9o4r0$bbi$[email protected]..
    > Hi,
    >
    > I?m developing an asp page containing a form with two
    dynamically
    > populated
    > list boxes and a submit button. The submit button should
    open up another
    > asp
    > page with results filtered by criteria determined by the
    contents of the 2
    > list
    > boxes. I can populate the list boxes OK but I am not
    sure about how to use
    > the
    > selected values as the filter. Can anyone point me in
    the right direction?
    >
    > Thanks,
    >
    > Chris
    >

  • Please Why These Marks ("???????" ) in My List Box ?

    hi all ;
    Please Tell me :
    when i want to add some records in arabic language in list box item as fixed ,,
    the result of the arabic record is as a question marks "???" , but the english is not ...
    can you tell me why this and how to solve it ....
    Best Regards.

    Hello;
    When i have faced this problem i solved it by configure jdeveloper compiler to work with arabic language.
    you can do that by these steps
    tools ---> project properties ---> compiler ---> select UTF-8 from charcter encoding combobox then click ok
    right click on your projects and do the same.
    Hope that helps you
    Best regards

  • List Box  Problem

    Hello Sir,
    The Problem that I am facing is not difficult but Confusing.
    In my First Jsp Page I have 2 Select boxes(Combo Boxes or U may Call List Box).
    I have Allowed Multiselect.
    the Second List Box is Empty.The person is allowed to Select what ever he wishes from the First Select Box to the Second List Box.
    Now after Selecting all his Options when he Submits his form the request is Delegated to another JSP.
    The Problem that I am facing is that I want all the item's that
    Are Present in the Second Lsit Box.
    How do I get all the (Items)values that are present in that List Box.
    With Request.getParameterValues()
    I can only get what all items are Selected in the Second List box but I need all the (Items)values that present in the List Box.
    Please Could Some One help me out.
    very Urgent
    With Regards
    Eklavya

    Hello Sir,
    The Problem that I am facing is not difficult but
    Confusing.
    In my First Jsp Page I have 2 Select boxes(Combo Boxes
    or U may Call List Box).
    I have Allowed Multiselect.
    the Second List Box is Empty.The person is allowed to
    Select what ever he wishes from the First Select Box
    to the Second List Box.
    Now after Selecting all his Options when he Submits
    his form the request is Delegated to another JSP.
    The Problem that I am facing is that I want all the
    item's that
    Are Present in the Second Lsit Box.
    How do I get all the (Items)values that are present in
    that List Box.
    With Request.getParameterValues()
    I can only get what all items are Selected in the
    Second List box but I need all the (Items)values that
    present in the List Box.
    Please Could Some One help me out.
    very Urgent
    With Regards
    EklavyaThere are 2 ways you could do this, I can think of. First, instead of using a select box for the second select box, you could use a textarea where the options from the first select box is transferred to. You would then access the values with request.getParameter("textareaName");.
    Or, you could have javascript code to loop through all of the options in the second select box, and create a string (possibly delimited by a space) upon submitting the form. Before you submit the form with Javascript, you would set a hidden field in the form to the string that was created with Javascript, and access the string with request.getParameter("hiddenfieldName"); Hope this helps.

  • Combo/list box image next to option

    Hi,
    I'm trying to display an image (small icon) within a drop
    down/combo/list box in a form. I've not found a simple way of doing
    it and wondered if anyone could advise of an easy way to do this
    seemingly simple task ?
    The result I'm after can be seen here:
    http://dhtmlx.com/docs/products/dhtmlxCombo/index.shtml
    of the five combo boxes displayed I'm after the 'combo box
    with icons' result. The method used on this page to acheive the
    effect seems a bit overkill for my requirement, otherwise I'd
    try/use it. I've looked at the page source, but nothing is revealed
    regarding the html/css used to do it.
    I'd appreciate anyone advising a simple way to do this.
    Many thanks.

    If your page is asp then the code below will do what you
    want. Now when a
    user selects a country then that country id will be entered
    into a cookie.
    then when the user goes to other pages on your site you can
    have if else
    statements to show language of your choice.
    if you need the country flag icons go to ip2location.com they
    will give them
    for free.
    <form action="" name=langswitch style="display:
    inline;">
    <table cellpadding=0 cellspacing=0 style="float:right;
    margin-top:-14px;"><tr>
    <td style="padding-left: 3px; padding-right:
    3px"><img
    src="/images/flags/<%= Request.Cookies("country")
    %>.gif" width="14"
    height="11" border="0"></td>
    <td><select name="langcountry"
    onchange="document.forms.langswitch.submit()">
    <option value="uk" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("uk" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>English
    <option value="es" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("es" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Espa&ntilde;ol
    <option value="de" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("de" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Deutsch
    <option value="fr" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("fr" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Fran&ccedil;ais
    <option value="it" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("it" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Italiano
    <option value="br" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("br" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Portugu&ecirc;s (Br)
    <option value="hu" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("hu" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Magyar
    <option value="ru" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("ru" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>Ð
    ÑfÑ?Ñ?кий
    <option value="jp" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("jp" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>æ-¥æo¬èªz
    <option value="kr" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("kr" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>í.oêµì-´
    <option value="cn" <%If (Not
    isNull(Request.Cookies("country"))) Then If ("cn" =
    CStr(Request.Cookies("country"))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>>ä¸æ-?(ç®?ä½")
    </select></td></tr>
    </table>
    </form>

Maybe you are looking for

  • Price in third party scenario

    When I am creating sales order for 3rd party scenario for xyz material for 1 pieces,  before saving the sales order if I see valuation data of the purchase requisition I see value per 1 unit. If I save the sales order then the valuation data of the p

  • Downgrading from Win8 to Win7 envy 17-j021nr drivers needed

    I have a customer who is running some software that doesn't like win8 so I am downgrading his new envy17 to win7.  I've managed to get all of the other drivers installed and working but it doesn't seem to matter which additional drivers I try to down

  • Browser plug-in for ejre1.4.2

    Hi, I tested the ejre1.4.2 on my Atmel at91sam9263 platform and it works fine in Linux. However, it does not come with browser plug-in. Unfortunately, other Jave SE embedded packages do not work with this armv5 processor. Is it possible to get a web

  • IPhone 4S Connectivity In Europe

    I need to know if I can use My Verizon IPhone 4s in Europe with Local Sim Card

  • Swap space/dump devices for large RAM systems

    We are in the process of changing our standards for our server builds and need some input. Currently, we match the swap space on local disk with the size of RAM. I know this isn't necessary for "swap" any more, but we use the swap area as the dump de