Author Topic: How to make a drop down list without a slider  (Read 2852 times)

0 Members and 1 Guest are viewing this topic.

RAIN CODE

  • Guest
How to make a drop down list without a slider
« 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.




Crank

  • Water Moccasin
  • Posts: 1503
Re: How to make a drop down list without a slider
« Reply #1 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;

}
Vault Professional 2023     +     AEC Collection

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #2 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 ?


Bhull1985

  • Guest
Re: How to make a drop down list without a slider
« Reply #3 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

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: How to make a drop down list without a slider
« Reply #4 on: June 05, 2014, 04:02:11 PM »
In OpenDCL you can set the dropdown height of a combo box

jb
James Buzbee
Windows 8

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #5 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

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #6 on: June 07, 2014, 03:41:25 AM »
JB
I did that but without any good result.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to make a drop down list without a slider
« Reply #7 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.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #8 on: June 07, 2014, 04:52:18 AM »
The Dcl file is at the top post

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #9 on: June 07, 2014, 04:55:17 AM »
Is OpenDcl equal Dcl ?

RAIN CODE

  • Guest
Re: How to make a drop down list without a slider
« Reply #10 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