Author Topic: [DCL] display problem  (Read 1840 times)

0 Members and 1 Guest are viewing this topic.

ziele_o2k

  • Newt
  • Posts: 49
[DCL] display problem
« on: June 28, 2017, 02:17:15 AM »
Below, you can find code for problematic DCL dialog.

Code: [Select]
Sett : dialog
{ label = "Quick Settings:";
  width = 50;
  : row {
    : column {
      : text { label = "Rozbic blok:"; }
      : text { label = "Troche dluzszy tekst:"; }
    }
    : column {
      _RADIO1;
      _RADIO2;
    }
  }
  : _POPUP { key = "B_1"; label = "&Czy wstawic punkt w srodku:"; }
  : _POPUP { key = "B_4"; label = "&Separator:"; }
  : _EDITBOX { key = "B_2"; label = "&Wysokosc tekstu:"; edit_limit = 10; }
  : _EDITBOX { key = "B_3"; label = "Odstep &tekstu:"; edit_limit = 10; }
  spacer_1;
  : row {
    alignment = centered;
    fixed_width = true;
    : _BUTTON { key = "OK"; label = "&Ok"; is_default = true; }
    : _BUTTON { key = "CANCEL"; label = "&Anuluj"; is_cancel = true; }
  }
  errtile;
}
_BUTTON : button { width = 13; fixed_width = true; }
_POPUP : popup_list { edit_width = 30; }
_EDITBOX : edit_box { edit_width = 30.8; }
_RADIO1 : row {
  : radio_button {
    key = "op1";
    label = "&Tak";
  }
  : radio_button {
    key = "op2";
    label = "&Nie";
  }
  spacer;
}
_RADIO2 : row {
  : radio_button {
    key = "op3";
    label = "&Wiecej Tak";
  }
  : radio_button {
    key = "op4";
    label = "&Wiecej Nie";
  }
  spacer;
}

This dcl displays different on various machines. To see differences, please check attachments.
Could someone explain to me where the problem is?

EDIT:
Attached images have wrong names :)
wrong is good and good is wrong :D
« Last Edit: June 28, 2017, 02:28:22 AM by ziele_o2k »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: [DCL] display problem
« Reply #1 on: June 28, 2017, 03:31:43 AM »
It's a long time since I've done any DCL work, but ...

Perhaps force the width of the RADIO section to be less that the POPUP and EDITBOX

25 seems to work.

Note that this is very similar to the one I posted elsewhere but it may provide a consistent output across various systems.

did you mean for all of those buttons to be unlinked ??
ie not using radio_row or :toggle prototype

BTW: I like your use of custom prototypes.

Code - Auto/Visual Lisp: [Select]
  1. Sett : dialog
  2. { label = "Quick Settings:";
  3.   width = 50;
  4.   : row {
  5.     : column {
  6.       : text { label = "Rozbic blok:"; }
  7.       : text { label = "Troche dluzszy tekst:"; }
  8.     }
  9.     : column {
  10.       width = 25;
  11.       _RADIO1;
  12.       _RADIO2;
  13.     }
  14.   }
  15.   : _POPUP { key = "B_1"; label = "&Czy wstawic punkt w srodku:"; }
  16.   : _POPUP { key = "B_4"; label = "&Separator:"; }
  17.   : _EDITBOX { key = "B_2"; label = "&Wysokosc tekstu:"; edit_limit = 10; }
  18.   : _EDITBOX { key = "B_3"; label = "Odstep &tekstu:"; edit_limit = 10; }
  19.   spacer_1;
  20.   : row {
  21.     alignment = centered;
  22.     fixed_width = true;
  23.     : _BUTTON { key = "OK"; label = "&Ok"; is_default = true; }
  24.     : _BUTTON { key = "CANCEL"; label = "&Anuluj"; is_cancel = true; }
  25.   }
  26.   errtile;
  27. }
  28.  
  29. /// < remainder not shown >
  30.  



Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: [DCL] display problem
« Reply #2 on: June 28, 2017, 04:17:58 AM »

Here's another option :)



Code - DCL: [Select]
  1. Sett : dialog
  2. { label = "Quick Settings:";
  3.   width = 50;
  4.   : row {
  5.         : text { label = "Rozbic blok:"; }
  6.         _RADIO1;
  7.   }
  8.   :row {
  9.     : text { label = "Troche dluzszy tekst:"; }
  10.     _RADIO2;
  11.   }  
  12.  
  13.   : _POPUP { key = "B_1"; label = "&Czy wstawic punkt w srodku:"; }
  14.   : _POPUP { key = "B_4"; label = "&Separator:"; }
  15.   : _EDITBOX { key = "B_2"; label = "&Wysokosc tekstu:"; edit_limit = 10; }
  16.   : _EDITBOX { key = "B_3"; label = "Odstep &tekstu:"; edit_limit = 10; }
  17.   spacer_1;
  18.   : row {
  19.     alignment = centered;
  20.     fixed_width = true;
  21.     : _BUTTON { key = "OK"; label = "&Ok"; is_default = true; }
  22.     : _BUTTON { key = "CANCEL"; label = "&Anuluj"; is_cancel = true; }
  23.   }
  24.   errtile;
  25. }
  26.  
  27. _BUTTON : button { width = 13; fixed_width = true; }
  28.  
  29. _POPUP : popup_list { edit_width = 30; }
  30.  
  31. _EDITBOX : edit_box { edit_width = 30.8; }
  32.  
  33. _RADIO1 : boxed_radio_row {
  34.   width = 20;
  35.   : radio_button {
  36.     key = "op1";
  37.     label = "&Tak";
  38.   }
  39.   : radio_button {
  40.     key = "op2";
  41.     label = "&Nie";
  42.   }
  43.   spacer;
  44. }
  45.  
  46. _RADIO2 : boxed_radio_row {
  47.   width = 20;
  48.   : radio_button {
  49.     key = "op3";
  50.     label = "&Wiecej Tak";
  51.   }
  52.   : radio_button {
  53.     key = "op4";
  54.     label = "&Wiecej Nie";
  55.   }
  56.   spacer;
  57.  
  58.  
  59.  




Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: [DCL] display problem
« Reply #3 on: June 30, 2017, 02:40:54 PM »
If memory serves, DCL dialogs can be sensitive to OS text settings on individual computers (text size, font, and so on).
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}