Dialog ComboBox Problem

Started by LAKosin, August 07, 2014, 09:37:09 AM

Previous topic - Next topic

LAKosin

I'm sure I'm missing something very simple but I cannot get the Drop Down Combo Box to work.

When I try to test the following, the drop down box says error: dlvariable1 not defined.

I'm running Winbatch 2014B & here is the exact code I'm using.


dlVariable1 = "ACPC" :@TAB: "Computer Center" :@TAB: "Admissions"

AdminInfoFormat=`WWWDLGED,6.1`

AdminInfoCaption=`PENN STATE ERIE, The Behrend College - Administrative User Account Creation Data Form`
AdminInfoX=005
AdminInfoY=020
AdminInfoWidth=379
AdminInfoHeight=291
AdminInfoNumControls=012
AdminInfoProcedure=`DEFAULT`
AdminInfoFont=`DEFAULT`
AdminInfoTextColor=`DEFAULT`
AdminInfoBackground=`DEFAULT,DEFAULT`
AdminInfoConfig=1

AdminInfo001=`086,009,174,014,STATICTEXT,DEFAULT,"Administrative User Input Form",DEFAULT,140,512,"Microsoft Sans Serif|9421|40|34","0|0|255","255|255|255"`
AdminInfo002=`014,034,102,010,STATICTEXT,DEFAULT,"Enter First Name",DEFAULT,1,DEFAULT,"Arial|8192|40|34","0|0|0",DEFAULT`
AdminInfo003=`142,033,142,011,EDITBOX,FirstName,DEFAULT,DEFAULT,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
AdminInfo004=`014,049,102,011,STATICTEXT,DEFAULT,"Enter Last Name",DEFAULT,1,DEFAULT,"Arial|8192|40|34","0|0|0",DEFAULT`
AdminInfo005=`142,049,142,011,EDITBOX,LastName,DEFAULT,DEFAULT,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
AdminInfo006=`014,062,102,009,STATICTEXT,DEFAULT,"Enter Penn State Access ID",DEFAULT,1,DEFAULT,"Arial|8192|40|34","0|0|0",DEFAULT`
AdminInfo007=`142,062,030,009,EDITBOX,UID,DEFAULT,DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
AdminInfo008=`100,273,048,011,PUSHBUTTON,DEFAULT,"CONTINUE",1,9,DEFAULT,"Microsoft Sans Serif|6656|70|34","0|0|0","0|255|0"`
AdminInfo009=`172,273,048,011,PUSHBUTTON,DEFAULT,"RETURN",2,10,DEFAULT,"Microsoft Sans Serif|6963|70|34","255|255|255","0|0|255"`
AdminInfo010=`239,273,048,011,PUSHBUTTON,DEFAULT,"CANCEL",0,11,DEFAULT,"Microsoft Sans Serif|6656|70|34","0|0|0","255|0|0"`
AdminInfo011=`014,087,129,013,STATICTEXT,DEFAULT,"Select/Enter Users's Department",DEFAULT,5,512,"Microsoft Sans Serif|7373|70|34",DEFAULT,DEFAULT`
AdminInfo012=`153,087,188,023,DROPLISTBOX,dlVariable1,DEFAULT,DEFAULT,120,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

AdminInfoButtonPushed=Dialog("AdminInfo")
                                             

Deana

Code looks okay to me.

Please add DebugTrace(@on,"trace.txt") to the beginning of the script, run it until the error or completion, then inspect the resulting trace file for clues as to the problem.

Feel free to post the trace file here, if you need further assistance.
Deana F.
Technical Support
Wilson WindowWare Inc.

LAKosin


kdmoyers

hmmm. the provided code worked fine for me. odd.
The mind is everything; What you think, you become.

Deana

Curious. The heading in the trace file you posted contained: WIL Dialog Editor WWWDLGED,6.1. I would have expected it to read: WinBatch 32 2014B. How did you launch the script exactly?
Deana F.
Technical Support
Wilson WindowWare Inc.

LAKosin

I ran that one with the 'Test' function inside the Dialog Editor.
I've attached another log running it with Winbatch.Exe.

I still don't get a dropdown box that I can select from.

LAKosin

I tried compiling it and running it and I get the entire list (from the variable) in the box but it is NOT a drop down list that I can select one item from.
Debugtrace file attached.

Deana

Quote from: LAKosin on August 07, 2014, 11:34:30 AM
I ran that one with the 'Test' function inside the Dialog Editor.
I've attached another log running it with Winbatch.Exe.

I still don't get a dropdown box that I can select from.

Strange. I am not sure how you were able to produce DebugTrace from the WIL Dialog Editor. Could you please provide the exact steps?

Also, and more importantly....The second trace log generated with WinBatch 2014B seemed to successfully run through to normal completion with NO errors. I see the dlVariable1 variable is defined.

You state that you still don't get a dropdown box that I can select from. Does the dropbox simply not appear on the dialog? Or does the dropbox itself contain the text 'dlvariable1 not defined'.

The code you posted should run fine from WinBatch 2014B as a .wbt file or compiled. The debugtrace you posted indicates that the variable is defined and displayed. Not quite sure I grasp what could be going on your system.

Anyone else?
Deana F.
Technical Support
Wilson WindowWare Inc.

Deana

Please post a screen shot of the dropbox contents when run as a .wbt file (NOT from the WIL Dialog Editor).
Deana F.
Technical Support
Wilson WindowWare Inc.

LAKosin

I included the DebugTrace at the beginning of the script and ran the dialog using F10.
This gives me the "error: dlvariable1 not defined" in the dropdown box which displays only one line.

Compiled, It runs to completion and I get a the variable list in a one line display.
The 'dropdown' box is only one line.
I can select that line but I'm not given the option to select any individual item as they all appear on one line.

LAKosin

I can't make the file small enough.

Deana

Okay the WIL Dialog Editor only understands Dialog code and would not allow you to define any variables. That was why your were seeing "error: dlvariable1 not defined" when testing in the WIL Dialog Editor using F10.

The Droplistbox does accept a tab delimited list of items. The code you originally posted  defined that variable as follows:

Code (winbatch) Select
dlVariable1 = "ACPC" :@TAB: "Computer Center" :@TAB: "Admissions"

This code should display the items on their own individual line in the Droplistbox. Can you please confirm this is the exact code you are using to define that variable?
Deana F.
Technical Support
Wilson WindowWare Inc.

td

Several follow-up point:

  • It is possible to create a DebugTrace file when the dialog editor loads a script using the file open command but, as previously mentioned, not via the f10 run command.
  • It seems possible that the OP has a size issue; i.e.,  the DROPLISTBOX list box needs to be bigger.
  • To make the list part bigger in Dialog Editor, click the DRIPLISTBOX's button and drag the sizing rectangle to the desired size.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

LAKosin

Deana, That is the EXACT code in my script.
It does NOT display each item on an individual line.

TD; I can make the DROPLISTBOX wider but I cannot make it taller.

I am out of the office till Monday 8/11 so I can''t try anything since I don't have WB or my files with me.

td

Quote from: LAKosin on August 07, 2014, 05:01:24 PM
Deana, That is the EXACT code in my script.
It does NOT display each item on an individual line.
It display each item on a line for everyone that has tested it. 
Quote
TD; I can make the DROPLISTBOX wider but I cannot make it taller.
Yes you can.  As stated previously, you need to click on the DROPTLISTBOX's button while viewing it in the dialog editor.  This causes the editor to display the sizing rectangle for the drop-down list part of the control.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

LAKosin

Okay, not sure what was going on but a reboot seems to have addressed the droplistbox display issue.

I still cannot resize the droplistbox in the dialog editor.
I can make it wider or narrower but I CANNOT make it taller.

I WAS able to effect the height by directly editing the height parameter so that it is taller when you click on it when you run it.


td

Quote from: LAKosin on August 11, 2014, 04:10:45 AM

I still cannot resize the droplistbox in the dialog editor.
I can make it wider or narrower but I CANNOT make it taller.

I WAS able to effect the height by directly editing the height parameter so that it is taller when you click on it when you run it.

You CAN make the DROPLISTBOX 'taller'.  Do the following:

  • Select a DROPLISTBOX in Dialog Editor by clicking on it.
  • Click a second time but on the down arrow button of the control. This will cause the black sizing marks to rotate from sides to the top and bottom of the sizing rectangle.
  • Click and hold the bottom or top of the sizing rectangle to make the box 'taller'.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

LAKosin

That is REALLY counterintuitive .
I wish that was explained in the help file.

Thanks

td

For future reference, sizing of DROPLISTBOXes is discussed in the Dialog Editor help file. From the help file:

The Drop-down Combo Box control is made up of two parts: an Edit Box and a drop-down Item List Box. A user can enter a value in the Edit Box or select a suggested value from the list of drop-down menu items. The drop-down Item List Box is displayed by clicking on the arrow next to the Edit Box.

To size the Edit Box:

Drag the left or right edge of the control to the necessary width.

To size the drop-down Item List box:

Clicking on the arrow next to the Edit Box. You will notice the highlighting changes on the control. You can now drag the top or bottom edge of the control to the necessary height.

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

LAKosin

Not to belabor the point BUT the sizing is mentioned if you look at the Drop-Down Combo Box but it is not mentioned if you look at DROPLISTBOX (which is what I had been referencing).

td

Drop-down Combo Box and DROPLISTBOX are the same. The first is the non tool specific common control name of the control and the second is the name used to identify the control in a WIL dialog template.  I am not aware of making this connection being an issue over the last 13 years of the current incarnation of the Dialog Editor but I suppose we could add something to the help file to make that clear.  Although, given the subject line of this topic, it is a little surprising that the connection was not made.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade