Author Topic: Dialog ComboBox Problem  (Read 9483 times)

LAKosin

  • Newbie
  • *
  • Posts: 21
Dialog ComboBox Problem
« on: August 07, 2014, 09:37:09 am »
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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Dialog ComboBox Problem
« Reply #1 on: August 07, 2014, 09:43:56 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #2 on: August 07, 2014, 10:39:52 am »
Here is the debugtrace file.

kdmoyers

  • Sr. Member
  • ****
  • Posts: 279
Re: Dialog ComboBox Problem
« Reply #3 on: August 07, 2014, 10:50:42 am »
hmmm. the provided code worked fine for me. odd.
The mind is everything; What you think, you become.

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Dialog ComboBox Problem
« Reply #4 on: August 07, 2014, 11:25:12 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #5 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.

LAKosin

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #6 on: August 07, 2014, 11:45:56 am »
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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Dialog ComboBox Problem
« Reply #7 on: August 07, 2014, 11:50:12 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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Dialog ComboBox Problem
« Reply #8 on: August 07, 2014, 11:55:07 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #9 on: August 07, 2014, 11:57:27 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #10 on: August 07, 2014, 12:03:07 pm »
I can't make the file small enough.

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Dialog ComboBox Problem
« Reply #11 on: August 07, 2014, 12:11:59 pm »
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
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

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Dialog ComboBox Problem
« Reply #12 on: August 07, 2014, 01:41:15 pm »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #13 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.

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

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Dialog ComboBox Problem
« Reply #14 on: August 08, 2014, 06:51:03 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #15 on: August 11, 2014, 04:10:45 am »
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

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Dialog ComboBox Problem
« Reply #16 on: August 11, 2014, 06:38:58 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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #17 on: August 11, 2014, 06:46:31 am »
That is REALLY counterintuitive .
I wish that was explained in the help file.

Thanks

td

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Dialog ComboBox Problem
« Reply #18 on: August 11, 2014, 07:04:10 am »
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

  • Newbie
  • *
  • Posts: 21
Re: Dialog ComboBox Problem
« Reply #19 on: August 11, 2014, 07:32:27 am »
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

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Dialog ComboBox Problem
« Reply #20 on: August 11, 2014, 07:58:34 am »
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