Consultingwerk.SmartComponents.TypeDescriptor package
 
Forums / SmartComponent Library - Developer Forum / Consultingwerk.SmartComponents.TypeDescriptor package

Consultingwerk.SmartComponents.TypeDescriptor package

9 posts, 0 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018
    Link to this post
    I have created our own OspreyComponents that are unique to our Mobile Tablet application. Basically, add our own designer verbs and formatting of controls. We then extended our OspreyBindingSource to include the verb "Add ORS Mobile Fields". The intent is to drop our unique controls on the form instead of the default infragisitcs.

    All works good. The only issue I am having is some of the extended properties used when dropping a control on an UltraGridLayoutPanel or Microsoft TableLayoutPanel are not shown. I am thinking I need to do something with the TypeDescriptor package so it knows how to deal with these extended properties. 

    http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/HTML/Infragistics2.Win.Misc.v12.1~Infragistics.Win.Misc.UltraGridBagLayoutManager.html
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    17 Dec 2018 in reply to Roger Blanchard
    Link to this post
    Please share the definition of those properties. By default properties defined against ABL primitive types should show in the property sheet by default. 

    There should not be any need to work with the Type Descriptor. Just as a warning ... this is something where we cannot support you. 
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018 in reply to Mike Fechner
    Link to this post
    If you use the SmartGenericLookup as a sample and drop it on an Infragistics.UltraGridBagLayoutManager you will be missing the following properties;

    GridBagLayout.GridBagConstraint
    GridBagLayout.IncludeInLayout
    GridBagLayout.PreferredSize

    Then drop an UltraTextEditor on the same GridBagLayoutManager you will see those properties.

    You see a similar issue when dropping the controls on a System.Windows.Forms.TableLayoutPanel. You will be missing;
    Column
    ColumnSpan
    Row
    RowSpan


  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018 in reply to Roger Blanchard
    Link to this post
    https://www.infragistics.com/help/winforms/infragistics.win.misc~infragistics.win.misc.ultragridbaglayoutmanager


  5. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    17 Dec 2018 in reply to Roger Blanchard
    Link to this post
    OK I see that. It does not impact the ability to set the Column and Row properties of the Table Layout Panel child controls - as the TLP extends the Add method of the Control collection.

    To set the ColSpan add code like this to the Constructor of the Viewer:

    tableLayoutPanel1:SetColumnSpan(smartBusinessEntityLookup1, 2) .

    Controls like the TableLayoutPanel or the UltraTooltipProvider implement an Extender Provider.

    https://docs.microsoft.com/en-us/previous-versions/d6c1xa43(v=vs.140)

    Those providers inject properties to the property grid of certain components and implement a special code generator - as typically those properties are not accessible on the components themselves, but accessible using a Set.... method on the extender provider component. 

    Not sure, why this does not work with the SmartBusinessEntityLookup.
  6. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    18 Dec 2018 in reply to Mike Fechner
    Link to this post
    Hey Mike,

    It is not just SmartBusinessEntityLookup. The SmartComboEditor, SmartDataBrowser, SmartDataCombo, etc. all have the same behavior. It looks like any control that uses the Custom Type Descriptor.


    /* Mike Fechner, Consultingwerk Ltd. 19.05.2010
           Core implementation of ICustomTypeDescriptor */
    {Consultingwerk/SmartComponents/Base/ICustomTypeDescriptor.i}
    {Consultingwerk/SmartComponents/Base/CreateVerbs.i}
  7. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Dec 2018 in reply to Mike Fechner
    Link to this post
    Mike,

    Do you know if this is something that will be supported (dropping SCL components on UltraGridLayoutPanel and seeing extended properties) ? We use the UltraGridLayoutPanel extensively in our Tablet application. If not I just need to plan to do something different.

    Thanks.
  8. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    19 Dec 2018 in reply to Roger Blanchard
    Link to this post
    I cannot promise that we'll be able to support that at all. First I need to check if that's caused by our ICustomTypeDescriptor implementation, if there's a general limitation for that with custom type descriptors or if that might be an issue with ABL inherited controls.

    Logging a bug would help though :-) 

    In any way, you can always use the workaround and invoke the Set.... methods of the UltraGridBagLayoutPanel for the control in question. It usually helps to look at which code is generated for a simple text box.
  9. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Dec 2018 in reply to Mike Fechner
    Link to this post
    I will log a bug...thanks. 

    As far as the workaround that would work for the Microsoft TableLayout Panel and I have working in a viewer. At design time the controls appear in the cell you dropped them in with the only change in code would be to set the Colspan and Rowspan.

    For the UltraGridBagLayoutManager the next time you open the form the controls are all over the place. It just makes a mess at design time.

    When using the UltraGridLayoutPanel an addl object is defined and created in InitializeComponent (for each control). 

    DEFINE VARIABLE gridBagConstraint1 AS Infragistics.Win.Layout.GridBagConstraint NO-UNDO.

    gridBagConstraint1 = NEW Infragistics.Win.Layout.GridBagConstraint().

    Then the properties of this new object are set and then associated with the control using the SetGridBagConstraint.

    /*  */
      /* ultraTextEditor1 */
      /*  */
      gridBagConstraint1:Fill = Infragistics.Win.Layout.FillType:Both.
      gridBagConstraint1:OriginX = 0.
      gridBagConstraint1:OriginY = 0.
      THIS-OBJECT:ultraGridBagLayoutPanel1:SetGridBagConstraint(THIS-OBJECT:ultraTextEditor1, gridBagConstraint1).
      THIS-OBJECT:ultraTextEditor1:Location = NEW System.Drawing.Point(126, 39).
      THIS-OBJECT:ultraTextEditor1:Name = "ultraTextEditor1".
      THIS-OBJECT:ultraGridBagLayoutPanel1:SetPreferredSize(THIS-OBJECT:ultraTextEditor1, NEW System.Drawing.Size(100, 21)).
      THIS-OBJECT:ultraTextEditor1:Size = NEW System.Drawing.Size(100, 21).
      THIS-OBJECT:ultraTextEditor1:TabIndex = 0.
9 posts, 0 answered