Author Topic: Standard DCL question?  (Read 16074 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
Standard DCL question?
« on: May 08, 2012, 05:57:13 PM »
Is there a term to place on a dialog that insures only one Radio button can be selected?
I separated groups of them using boxed_column which restricts selection in each boxed column.
I was able to designate the first one selected by default using
Quote
initial_focus = "a18";
Still looking for another term to do the button restriction.

I'm going to try tricking boxed_column around all of the dialog once.
« Last Edit: May 08, 2012, 06:01:27 PM by KewlToyZ »

MP

  • Seagull
  • Posts: 17490
Re: Standard DCL question?
« Reply #1 on: May 08, 2012, 06:02:39 PM »
Group the the radio_buttons within a (boxed) row or column.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #2 on: May 08, 2012, 06:03:36 PM »
Oh ok I'll try boxed_row
boxed_column didn't work ....

Lee Mac

  • Seagull
  • Posts: 12292
  • London, England
Re: Standard DCL question?
« Reply #3 on: May 08, 2012, 06:04:49 PM »
If you group a set of radio_button tiles beneath a parent radio_cluster tile, only one radio_button will be selectable from those child radio_tiles.

An example:

Code - DCL: [Select]
  1. : radio_cluster
  2. {
  3.     : row
  4.     {
  5.         : column
  6.         {
  7.             : radio_button { key = "key1"; label = "Option 1"; }
  8.             : radio_button { key = "key2"; label = "Option 2"; }
  9.             : radio_button { key = "key3"; label = "Option 3"; }
  10.         }
  11.         : column
  12.         {
  13.             : radio_button { key = "key4"; label = "Option 4"; }
  14.             : radio_button { key = "key5"; label = "Option 5"; }
  15.             : radio_button { key = "key6"; label = "Option 6"; }
  16.         }
  17.     }
  18. }

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #4 on: May 08, 2012, 06:08:53 PM »
Hmmm not working... maybe I need to find another means to group them so I can sarround it all with boxed_ .....

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #5 on: May 08, 2012, 06:42:08 PM »
Hmmm tried boxed_radio_cluster & boxed_radio_row with no luck.
I may have to change the layout removing the boxed_columns to make them work as a single cluster? I wonder if it's just the ViewDCL.lsp not enforcing it?
I really wanted this in standard DCL because I want to read the code with a simple text editor.

I may have to revert to list boxes, but again, I would still need to enforce only one of those working and the list is too long for a single list box.
« Last Edit: May 08, 2012, 06:45:29 PM by KewlToyZ »

Lee Mac

  • Seagull
  • Posts: 12292
  • London, England
Re: Standard DCL question?
« Reply #6 on: May 08, 2012, 06:47:48 PM »
Oh, I didn't realise you wanted to only permit a single selection across the entire dialog... since the boxed_column tiles are clusters in themselves, I don't think the radio_cluster will permeate through to the radio_buttons.

How about using an updating list_box tile over multiple sets of radio_buttons?

Had a few minutes so put this together as an example:


KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #7 on: May 08, 2012, 11:51:12 PM »
Thanks Lee, I was pondering it as a popup list for each set.
I may just setup each set with its own dialog and use something like a Next button to flip to the next set Dialog (like DCL's version of Tabs) and show the reference table of values next to the Scale selection. Something like this partial I started Below.

If nothing else it acts as a reference guide when people are trying to figure out what they see on their drawings too.
« Last Edit: May 08, 2012, 11:55:34 PM by KewlToyZ »

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #8 on: May 11, 2012, 05:42:21 PM »
Hey Lee, any examples of a radio button setting the list information in a dcl you know of?

GDF

  • Water Moccasin
  • Posts: 2000
Re: Standard DCL question?
« Reply #9 on: May 11, 2012, 06:51:04 PM »
Same as Lee's, except for toggle button to set up list box.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2019x64 Windows 10x64

Lee Mac

  • Seagull
  • Posts: 12292
  • London, England
Re: Standard DCL question?
« Reply #10 on: May 12, 2012, 12:55:03 PM »
Hey Lee, any examples of a radio button setting the list information in a dcl you know of?

Not that I know of, so I spent a little time helping you out - try the attached  :-)

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #11 on: May 12, 2012, 01:14:28 PM »
Dang Lee, thank you sir  ;-)
I was just looking for some examples. I haven't read yours yet.
I went and did something based upon a few different examples in a very basic form just to get through it.
I used Irneb's method for adding scales which runs fast the first time but decreases in speed every time it is ran after that.
So I'll post what I did. But for some reason it doesn't seem as fast as before.
That could be because of the volume of scales I am inserting initially.
I just seem to think it ran faster when I first tried Irneb's. Looking through now, it is likely because his broke the scale lists down smaller. Likely reading through yours will shed some light on how I can do that.
But mine seriously tanks even slower than the vb version now.
« Last Edit: May 12, 2012, 01:45:39 PM by KewlToyZ »

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #12 on: May 12, 2012, 01:16:50 PM »
Holy crap, you used programmatic extraction for the ratios from the string selection. :-o

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #13 on: May 12, 2012, 01:26:51 PM »
Wow. That's the entire enchilada Lee  :lmao:

KewlToyZ

  • Guest
Re: Standard DCL question?
« Reply #14 on: May 12, 2012, 01:43:55 PM »
I have been using this new AutoLoader http://www.theswamp.org/index.php?topic=41576.0;topicseen

Looking through the ACAD_SCALELIST section, when I open the drawing the first time the list seems like it may have everything present just not showing in CANNOSCALE availability. When I run the routine inserting the scales the very first time, it increases the list by about 4x, even though I run a -scalelistedit reset. I run it again, and it gets even larger.
So I think this is why the routine appears to slow down. I'm just wondering how I cleanup the file properly since scalelistedit doesn't do it? If I am reading this right, is this registry entries?