TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: RAIN CODE on June 01, 2014, 04:48:06 AM

Title: How to make a drop down list without a slider
Post by: RAIN CODE on June 01, 2014, 04:48:06 AM
Hi guys,

The original ddim dialog box has a drop-down list without a slider that displayed all the items in the list.

But my Pacman startup dialog box has a narrow view with a slider and not showing all the items in the list

I have been trying many ways of getting around this problem but no matter what I tried it still the same.

A simple Dcl and lisp is below attached

Thanks.



Title: Re: How to make a drop down list without a slider
Post by: Crank on June 01, 2014, 06:14:50 AM
If a slider is present, depends on the number of items in your list.

I think you should use a list_box in your DCL-file in stead of the popup_list to accomplish what you want.

Code: [Select]
//StartUp Menu for Pacman and Planet Zog v1.2

DDlist : dialog {
label = "Test drop down list";
spacer_1;

: boxed_column {
        label = "Drop list";

// : popup_list {
// key = "selections";
// value = "1";
// }
: list_box {
label = " ";
key = "selections";
// width = 12;
// height = 12;
// fixed_height = true;
}
//spacer;
}

spacer;
: row {
fixed_width = true;
alignment = centered;
: default_button {
label = "OK";
key = "OK";
width = 2;
}
: spacer {
width = 5;
}
: button {
label = "Exit";
key = "Exit";
width = 2;
}
}
spacer;

}
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 05, 2014, 05:42:55 AM
If a slider is present, depends on the number of items in your list.

I think you should use a list_box in your DCL-file in stead of the popup_list to accomplish what you want.

Code: [Select]
//StartUp Menu for Pacman and Planet Zog v1.2

DDlist : dialog {
label = "Test drop down list";
spacer_1;

: boxed_column {
        label = "Drop list";

// : popup_list {
// key = "selections";
// value = "1";
// }
: list_box {
label = " ";
key = "selections";
// width = 12;
// height = 12;
// fixed_height = true;
}
//spacer;
}

spacer;
: row {
fixed_width = true;
alignment = centered;
: default_button {
label = "OK";
key = "OK";
width = 2;
}
: spacer {
width = 5;
}
: button {
label = "Exit";
key = "Exit";
width = 2;
}
}
spacer;

}

thats another way of working around this problem. Thanks.
 
But a list box take up space.  How to make a drop down list that can display all items in the list without a slider ?

Title: Re: How to make a drop down list without a slider
Post by: Bhull1985 on June 05, 2014, 08:45:48 AM
DCL is fairly rudimentary
If you're not able to construct your pop up list without a slider using the typical DCL controls, then I doubt you're going to be able to hardcode a way to do this into your DCL. It's just old, and not updated, and has a lot of problems that have required many persons to go to other GUI methods. That said, you could simply divide your list into two portions, preferably with some sort of distinguishing factor, i.e. a size and b size, (although that's arbitrary, not sure the contents of your list at this time) and create two popup list boxes, would probably reduce the contents of each list to where they can be shown without a slider.

Additionally, I would be careful when doing this, because monitor size may come into play here. May want to test your DCL and lisp on a machine using a regular size monitor, a "large" monitor as well as a small monitor, to see if there are any changes in the way the slider appears between the 3 setups. If it appears differently, then you may want to reconsider your methods because it would be a shame to spend so much time on having these appear correctly on your machine just to find out that your machine is the ONLY machine that will have them display correctly. Unless, of course, that's what you're after anyways :D
Title: Re: How to make a drop down list without a slider
Post by: jbuzbee on June 05, 2014, 04:02:11 PM
In OpenDCL you can set the dropdown height of a combo box

jb
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 07, 2014, 03:38:33 AM
Thanks Bhull for the explaination but the item length is only 3 and it only displayed 2 itema and with a slider
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 07, 2014, 03:41:25 AM
JB
I did that but without any good result.
Title: Re: How to make a drop down list without a slider
Post by: Kerry on June 07, 2014, 04:04:08 AM
JB
I did that but without any good result.
Show us what you tried.
OpenDCL works perfectly usually.
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 07, 2014, 04:52:18 AM
The Dcl file is at the top post
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 07, 2014, 04:55:17 AM
Is OpenDcl equal Dcl ?
Title: Re: How to make a drop down list without a slider
Post by: RAIN CODE on June 07, 2014, 05:11:22 AM
JB and Kerry,
Sorry for giving the wrong info as I thought JB was talking abt the height. Just found out abt Open Dcl