OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: stephan_35 on December 15, 2009, 03:36:13 PM

Title: PARTIAL SOLVED[6.0.0.16] Filter Style on textbox not apply !
Post by: stephan_35 on December 15, 2009, 03:36:13 PM
Hello,

I would like to set dynamically the textbox's "filter style".

Here are my files (see below)

I need to show again the dialog box.

Best regards , Stéphan.

Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: Fred Tomke on December 15, 2009, 03:46:15 PM
Hi Stephan,

did it work in earlier releases? I'm not sure, but I believe to remember that it is not possible to switch between FilterStyles at runtime. But I may be wrong...

Fred
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: owenwengerd on December 15, 2009, 03:52:11 PM
Fred is correct, it is not possible to change the filter style after the control is created. There have been improvements to the infrastructure in 6.0 so that this might be possible with some work, but the way the filter works internally makes it complicated to do.
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: stephan_35 on December 15, 2009, 04:07:45 PM
Fred: maybe do not work in earlier release, never use it  ;D

Owen :

Cannot set before dialog was shown  :(

So, find a solution, but still .... "diy"

Code (autolisp) Select

(dcl_Control_SetFilterStyle ... 0)
  (dcl_Form_Close ...)
  (dcl_Form_Show ...)


And using Initialise Event.

Best regards
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: Kerry on December 15, 2009, 04:18:06 PM

Possible solution :

Have 2 textbox controls.
Depending on the requirements, show only the one required by simply making the other not-visible. I have done this, but need to design one control slightly longer than the other so they are selectable in the Editor/Studio.
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: Fred Tomke on December 15, 2009, 04:24:33 PM
Yes, Kerry is right, I'd prefer different textboxes, too.
Or - just a thought- a grid with only one cell. If you need another style just clear the grid and create a new cell.

Fred
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: Kerry on December 15, 2009, 05:53:16 PM


Actually, I'm wondering if it's a good idea from an enduser's view to have the textbox filters different at different times. Would this lead to confusion.

Comment on close/show for form. I don't see a problem with this, depending on how much work needed to be done at initialisation.
Knowing how you intended using this would help us make an informed decision.

Hope that translates well.

Kerry


Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: owenwengerd on December 15, 2009, 08:22:44 PM
I think he just wants to support a user option to show or hide the entered password, which I think is a good idea. I would probably try Fred's dual textbox approach.
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: stephan_35 on December 16, 2009, 02:03:17 AM
Quote from: Kerry Brown on December 15, 2009, 05:53:16 PM
Actually, I'm wondering if it's a good idea from an enduser's view to have the textbox filters different at different times. Would this lead to confusion.

Hello Kerry,

I understood what you mean, but, i my case, i have to make a lot of dialog box, so i made some "generic" one, which i used every times i needed to .
I send some parameters like filter, default text, to customise them.

Best regards, Stéphan.
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: Fred Tomke on December 16, 2009, 02:58:01 AM
Quote from: stephan_35 on December 16, 2009, 02:03:17 AM
I send some parameters like filter, default text, to customise them.

Stephan, I know what you mean, I did it too in the old ObjectDCL with listviews when it was not possible to change the selection style from single to multiple at runtime. For that case I draw two identical listviews (with the exception of this only property), even with the same events and generic event function names for both. In the OnInitialize event I wrote

Code (autolisp) Select
(if isMultipleSelection
  (progn
    (dcl_control_setVisible MyProj_MyForm_LstSingle nil)
    (setq oListViewControl MyProj_MyForm_LstMultiple)
  ); progn
  (progn
    (dcl_control_setVisible MyProj_MyForm_LstMultiple nil)
    (setq oListViewControl MyProj_MyForm_LstSingle)
  ); progn
); if
(dcl_control_setvisible oListViewControl T)


And I go on accessing the right listview using the variable oListViewControl.

Fred
Title: Re: [6.0.0.16] Filter Style on textbox not apply !
Post by: stephan_35 on December 16, 2009, 03:30:25 AM
Thanks for help fred,

Sorry, I'm not agree with working two item to do one action, and i prefer to work only with one text_box or one list_view (didn't have any test with listview).

Work fine for myself now .  ;)

Best regards