OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Peter2 on October 29, 2014, 02:53:47 PM

Title: Combo Box - Styles 7 and 8
Post by: Peter2 on October 29, 2014, 02:53:47 PM
(see Masterdemo.lsp for examples)
-----------------------
If Combo Box has Style 7 (Plotstyle), then the first entry from the list is immediately displayed in the list.
Style 8 (Fonts) does not display an entry by default, an entry must be selected.

Bug or Feature?

Peter
Title: Re: Combo Box - Styles 7 and 8
Post by: owenwengerd on October 29, 2014, 07:49:54 PM
The plot style table combo is actually implemented by the host application, and apparently the host application automatically selects the current plot style table name after the combo is created. I guess technically it is working as designed, but I think the control should honor its Text property value that was set at design time. I will see if I can correct this.
Title: Re: Combo Box - Styles 7 and 8
Post by: Peter2 on October 30, 2014, 03:51:18 PM
The problem is probably deeper (for version 7.0.1.4):

dcl_Control_GetList returns "nil" if it is set to Style 7 (Plotstyle). Here is a log-file where I have defined it

a) for Style 8: Fonts are returned
b) for Style 7: nil is returned (although the plostyletables are displayed in the Combo Box)


Code (autolisp) Select

Befehl: (dcl_Control_GetList PC3_Font_Check_dialog_LstSystemPlot)
("AcadEref" "acaderef.shx" "aehalf.shx" "AIGDT" ....... "Webdings" "Wingdings")

-> Here I changed the style to 7 and reloaded the dialogue:

Befehl: (dcl_Control_GetList PC3_Font_Check_dialog_LstSystemPlot)
nil
Title: Re: Combo Box - Styles 7 and 8
Post by: Peter2 on October 30, 2014, 04:37:07 PM
Addendum:

The Plotstylelist behaves in the same way the plotstyle-combobox in print-dialog does: Started from a STB-drawing is shows only STB-files; started from a CTB-drawing it shows only CTB. This can be an unexpected side-effect sometimes.
Title: Re: Combo Box - Styles 7 and 8
Post by: Fred Tomke on November 12, 2014, 10:57:52 AM
Hi, Peter,

have you tried to count the combobox items and to return the item text of each ComboBox item (dcl-ComboBox-GetLBText)? I remember I had to used GetItemData in a color-styled combobox in the past but I may fail...

Regards, Fred