Plex 2E

 View Only
  • 1.  PLEX 7 WPF implementation of MDI

    Posted Jan 27, 2014 08:56 AM

    The MDI Parent and MDI Child functionality has been implemented by the CA run time as a tabstrip.  However we have no direct control over the appearance or behaviour of the tabs themselves (other than the textual content). 

    We would like to be able to :

    1. have vertical tabs or horizontal tabs
    2. control the width of the tab items.
    3. If the text content exceeds the control width then either allow scrolling of the text content by hovering over the tab with the mouse pointer or provide someother neat solution like the width auto-adjusting whilst it has focus and then reverting when another tab is hovered/clicked

    Anyone have any solutions or thoughts on the subject?

     



  • 2.  RE: PLEX 7 WPF implementation of MDI

    Posted Jan 29, 2014 12:51 PM
      |   view attached

    Hi, Dave

     With current runtime design and by adding folloiwings to your exe.app.xaml file you could reach like image.

    However to controle the Width of the ITEM and position of 'X' button control to fit Vertical mode, CA needs to expose some custom property and add some bindings.

    This is just one good sample of power of .NET WPF control look and feel customization part.

    <Style TargetType="ob:ObTabControl">
          <Setter Property="Background" Value="{StaticResource ObTransparent}"/>
          <Setter Property="TabStripPlacement" Value="Right"/>
    </Style>

    <Style TargetType="ob:ObTabItem">
        <Setter Property="Background" Value="{StaticResource ObTransparent}"/>
          <Setter Property="Padding" Value="4" />
          <Setter Property="HeaderTemplate">
            <Setter.Value>
              <DataTemplate>
                <ContentPresenter Content="{TemplateBinding Content}">
                  <ContentPresenter.LayoutTransform>
                    <RotateTransform Angle="90" />
                  </ContentPresenter.LayoutTransform>
                </ContentPresenter>
              </DataTemplate>
            </Setter.Value>
          </Setter>

    </Style>

     

    Regards,

    Kiyoshi



  • 3.  Re: [CA Plex General Discussion] RE: PLEX 7 WPF implementation of MDI

    Posted Jan 30, 2014 08:29 AM
    Kiyoshi,

    The issue is that our application has the possibility for a large number
    of tabs to be open within the MDI.
    Additionally the way we have configured it means that the textual content
    of the Name property is quite lengthy and the tabs often move to two or
    even three lines within the Tab Control.

    The solution is to fix the width of the tab by setting MaxWidth and also
    to specify the same textual content for the Tool Tip property.
    Currently the API OBWIN/CS Set current window caption calls
    fnc.ObUIMain.SetUITitle() and this updates the Name of the Tab Item.

    So can you extend the functionality of SetUITitle to also populate the
    Tool Tip ?
    Additionally is there an API exposed that we can use in the short term?

    Regards,
    David S GAMBLE
    SOFTWARE ENGINEERING
    GSWD
    12 Calthorpe Road, Edgbaston, Birmingham, B15 1QZ, United Kingdom
    ___________________________________________________________________________________




    Phone
    INT (6044) 7604 3877 EXT +44 (0)121 4553877
    Email
    davidgamble@hsbc.com
    Website
    HTS UK IT – SE Intranet

    ___________________________________________________________________________________
    Protect our environment - please only print this if you have to!




    From:
    CA Plex CA 2E Global User CommunityMessage Boards
    <CommunityAdmin@communities-mail.ca.com>
    To:
    "mb_message.2256321.108536266@myca-email.ca.com"
    <mb_message.2256321.108536266@myca-email.ca.com>
    Date:
    29/01/2014 17:51
    Subject:
    [CA Plex General Discussion] RE: PLEX 7 WPF implementation of MDI



    Hi, Dave
    With current runtime design and by adding folloiwings to your
    exe.app.xaml file you could reach like image.
    However to controle the Width of the ITEM and position of 'X' button
    control to fit Vertical mode, CA needs to expose some custom property and
    add some bindings.
    This is just one good sample of power of .NET WPF control look and feel
    customization part.
    <Style TargetType="ob:ObTabControl">
    <Setter Property="Background" Value="{StaticResource
    ObTransparent}"/>
    <Setter Property="TabStripPlacement" Value="Right"/>
    </Style>
    <Style TargetType="ob:ObTabItem">
    <Setter Property="Background" Value="{StaticResource ObTransparent}"/>
    <Setter Property="Padding" Value="4" />
    <Setter Property="HeaderTemplate">
    <Setter.Value>
    <DataTemplate>
    <ContentPresenter Content="{TemplateBinding Content}">
    <ContentPresenter.LayoutTransform>
    <RotateTransform Angle="90" />
    </ContentPresenter.LayoutTransform>
    </ContentPresenter>
    </DataTemplate>
    </Setter.Value>
    </Setter>
    </Style>

    Regards,
    Kiyoshi
    Posted by:Kiyoshi
    --
    CA Communities Message Boards
    108538806

    mb_message.2256321.108536266@myca-email.ca.com
    http://https://communities.ca.com



    ************************************************************
    HSBC Bank plc
    Registered Office: 8 Canada Square, London E14 5HQ
    Registered in England - Number 14259
    Authorised by the Prudential Regulation Authority and regulated by the
    Financial Conduct Authority and the Prudential Regulation Authority
    ************************************************************


    -----------------------------------------
    SAVE PAPER - THINK BEFORE YOU PRINT!

    This E-mail is confidential.

    It may also be legally privileged. If you are not the addressee you
    may not copy, forward, disclose or use any part of it. If you have
    received this message in error, please delete it and all copies
    from your system and notify the sender immediately by return
    E-mail.

    Internet communications cannot be guaranteed to be timely secure,
    error or virus-free. The sender does not accept liability for any
    errors or omissions.


  • 4.  RE: Re: [CA Plex General Discussion] RE: PLEX 7 WPF implementation of MDI

    Posted Jan 31, 2014 08:39 PM
      |   view attached

    Hi, David

     

    Some improvement is made. It might meet your requirements.

    • Add MaxWidth as 20 for header.
    • Add Trigger to remove MAX width when mouse pointer is ON. (It detect MouseOver whole Tab Item area not only a header part.)
    • The X button positioning in Vertical mode, probably CA needs to improve the runtime.

    HTH,

    Kiyoshi

    <Style TargetType="ob:ObTabItem">

    <Setter Property="Background" Value="{StaticResource ObTransparent}"/>

    <Setter Property="Padding" Value="4" />

    <Setter Property="HeaderTemplate">

    <Setter.Value>

    <DataTemplate>

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20">

    <ContentPresenter.LayoutTransform>

    <RotateTransform Angle="90" />

    </ContentPresenter.LayoutTransform>

    </ContentPresenter>

    </DataTemplate>

    </Setter.Value>

    </Setter>

    <Style.Triggers>

    <Trigger Property="IsMouseOver" Value="True">

    <Setter Property="HeaderTemplate">

    <Setter.Value>

    <DataTemplate>

    <ContentPresenter Content="{TemplateBinding Content}" >

    <ContentPresenter.LayoutTransform>

    <RotateTransform Angle="90" />

    </ContentPresenter.LayoutTransform>

    </ContentPresenter>

    </DataTemplate>

    </Setter.Value>

    </Setter>

    </Trigger>

    </Style.Triggers>

    </Style>



  • 5.  Re: [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: P

    Posted Feb 04, 2014 08:13 AM
    Rather than rotating by 90 which is rather messy can we not simply show a
    ToolTip after first setting the value of the ToolTIp equal to the name of
    the Tab Item (i.e. the text currently displayed) ?

    Regards,
    David S GAMBLE
    SOFTWARE ENGINEERING
    GSWD
    12 Calthorpe Road, Edgbaston, Birmingham, B15 1QZ, United Kingdom
    ___________________________________________________________________________________




    Phone
    INT (6044) 7604 3877 EXT +44 (0)121 4553877
    Email
    davidgamble@hsbc.com
    Website
    HTS UK IT – SE Intranet

    ___________________________________________________________________________________
    Protect our environment - please only print this if you have to!




    From:
    CA Plex CA 2E Global User CommunityMessage Boards
    <CommunityAdmin@communities-mail.ca.com>
    To:
    "mb_message.2256321.108660433@myca-email.ca.com"
    <mb_message.2256321.108660433@myca-email.ca.com>
    Date:
    01/02/2014 01:39
    Subject:
    [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: PLEX
    7 WPF implementation of MDI



    Hi, David

    Some improvement is made. It might meet your requirements.
    Add MaxWidth as 20 for header.
    Add Trigger to remove MAX width when mouse pointer is ON. (It detect
    MouseOver whole Tab Item area not only a header part.)
    The X button positioning in Vertical mode, probably CA needs to improve
    the runtime.
    HTH,
    Kiyoshi
    <Style TargetType="ob:ObTabItem">
    <Setter Property="Background" Value="{StaticResource ObTransparent}"/>
    <Setter Property="Padding" Value="4" />
    <Setter Property="HeaderTemplate">
    <Setter.Value>
    <DataTemplate>
    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20">
    <ContentPresenter.LayoutTransform>
    <RotateTransform Angle="90" />
    </ContentPresenter.LayoutTransform>
    </ContentPresenter>
    </DataTemplate>
    </Setter.Value>
    </Setter>
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="HeaderTemplate">
    <Setter.Value>
    <DataTemplate>
    <ContentPresenter Content="{TemplateBinding Content}" >
    <ContentPresenter.LayoutTransform>
    <RotateTransform Angle="90" />
    </ContentPresenter.LayoutTransform>
    </ContentPresenter>
    </DataTemplate>
    </Setter.Value>
    </Setter>
    </Trigger>
    </Style.Triggers>
    </Style>
    Posted by:Kiyoshi
    --
    CA Communities Message Boards
    108662973

    mb_message.2256321.108660433@myca-email.ca.com
    http://https://communities.ca.com



    ************************************************************
    HSBC Bank plc
    Registered Office: 8 Canada Square, London E14 5HQ
    Registered in England - Number 14259
    Authorised by the Prudential Regulation Authority and regulated by the
    Financial Conduct Authority and the Prudential Regulation Authority
    ************************************************************


    -----------------------------------------
    SAVE PAPER - THINK BEFORE YOU PRINT!

    This E-mail is confidential.

    It may also be legally privileged. If you are not the addressee you
    may not copy, forward, disclose or use any part of it. If you have
    received this message in error, please delete it and all copies
    from your system and notify the sender immediately by return
    E-mail.

    Internet communications cannot be guaranteed to be timely secure,
    error or virus-free. The sender does not accept liability for any
    errors or omissions.


  • 6.  Re: [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: P

    Posted Feb 04, 2014 08:13 AM
    Rather than rotating by 90 which is rather messy can we not simply show a
    ToolTip after first setting the value of the ToolTIp equal to the name of
    the Tab Item (i.e. the text currently displayed) ?

    Regards,
    David S GAMBLE
    SOFTWARE ENGINEERING
    GSWD
    12 Calthorpe Road, Edgbaston, Birmingham, B15 1QZ, United Kingdom
    ___________________________________________________________________________________




    Phone
    INT (6044) 7604 3877 EXT +44 (0)121 4553877
    Email
    davidgamble@hsbc.com
    Website
    HTS UK IT – SE Intranet

    ___________________________________________________________________________________
    Protect our environment - please only print this if you have to!




    From:
    CA Plex CA 2E Global User CommunityMessage Boards
    <CommunityAdmin@communities-mail.ca.com>
    To:
    "mb_message.2256321.108660433@myca-email.ca.com"
    <mb_message.2256321.108660433@myca-email.ca.com>
    Date:
    01/02/2014 01:39
    Subject:
    [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: PLEX
    7 WPF implementation of MDI



    Hi, David

    Some improvement is made. It might meet your requirements.
    Add MaxWidth as 20 for header.
    Add Trigger to remove MAX width when mouse pointer is ON. (It detect
    MouseOver whole Tab Item area not only a header part.)
    The X button positioning in Vertical mode, probably CA needs to improve
    the runtime.
    HTH,
    Kiyoshi
    <Style TargetType="ob:ObTabItem">
    <Setter Property="Background" Value="{StaticResource ObTransparent}"/>
    <Setter Property="Padding" Value="4" />
    <Setter Property="HeaderTemplate">
    <Setter.Value>
    <DataTemplate>
    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20">
    <ContentPresenter.LayoutTransform>
    <RotateTransform Angle="90" />
    </ContentPresenter.LayoutTransform>
    </ContentPresenter>
    </DataTemplate>
    </Setter.Value>
    </Setter>
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="HeaderTemplate">
    <Setter.Value>
    <DataTemplate>
    <ContentPresenter Content="{TemplateBinding Content}" >
    <ContentPresenter.LayoutTransform>
    <RotateTransform Angle="90" />
    </ContentPresenter.LayoutTransform>
    </ContentPresenter>
    </DataTemplate>
    </Setter.Value>
    </Setter>
    </Trigger>
    </Style.Triggers>
    </Style>
    Posted by:Kiyoshi
    --
    CA Communities Message Boards
    108662973

    mb_message.2256321.108660433@myca-email.ca.com
    http://https://communities.ca.com



    ************************************************************
    HSBC Bank plc
    Registered Office: 8 Canada Square, London E14 5HQ
    Registered in England - Number 14259
    Authorised by the Prudential Regulation Authority and regulated by the
    Financial Conduct Authority and the Prudential Regulation Authority
    ************************************************************


    -----------------------------------------
    SAVE PAPER - THINK BEFORE YOU PRINT!

    This E-mail is confidential.

    It may also be legally privileged. If you are not the addressee you
    may not copy, forward, disclose or use any part of it. If you have
    received this message in error, please delete it and all copies
    from your system and notify the sender immediately by return
    E-mail.

    Internet communications cannot be guaranteed to be timely secure,
    error or virus-free. The sender does not accept liability for any
    errors or omissions.


  • 7.  Re: [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: P

    Posted Feb 05, 2014 12:00 PM
    Kiyoshi,

    If I add the following

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20"
    ToolTip="Test Tool Tip" />

    Then I can see a popup Tool Tip. However what I want to do is set the
    ToolTip content = to the text normally displayed in the tab

    The following doesn't work as I suspect we would need some code behind to
    set the template value?

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20"
    ToolTip="{TemplateBinding Content}" />

    Any ideas how to move forward on this?

    Regards,
    David S GAMBLE
    SOFTWARE ENGINEERING
    GSWD
    12 Calthorpe Road, Edgbaston, Birmingham, B15 1QZ, United Kingdom
    ___________________________________________________________________________________




    Phone
    INT (6044) 7604 3877 EXT +44 (0)121 4553877
    Email
    davidgamble@hsbc.com
    Website
    HTS UK IT – SE Intranet

    ___________________________________________________________________________________
    Protect our environment - please only print this if you have to!




    ************************************************************
    HSBC Bank plc
    Registered Office: 8 Canada Square, London E14 5HQ
    Registered in England - Number 14259
    Authorised by the Prudential Regulation Authority and regulated by the
    Financial Conduct Authority and the Prudential Regulation Authority
    ************************************************************


    -----------------------------------------
    SAVE PAPER - THINK BEFORE YOU PRINT!

    This E-mail is confidential.

    It may also be legally privileged. If you are not the addressee you
    may not copy, forward, disclose or use any part of it. If you have
    received this message in error, please delete it and all copies
    from your system and notify the sender immediately by return
    E-mail.

    Internet communications cannot be guaranteed to be timely secure,
    error or virus-free. The sender does not accept liability for any
    errors or omissions.


  • 8.  RE: Re: [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] R
    Best Answer

    Posted Feb 05, 2014 04:28 PM

    David,

    I spent some time and I learned a lot as well. We need to expose the header text as  DependencyProperty. Which is almost nothing for us to do.

    But I don’t think defining behavior to put as ToolTip in runtime may not the best way to go. However once you have an access to the txt, you can use and customize your Header. Including MaxSize and use the HeaderText as ToolTip. This is more flexible and other users can decide how to use. (I  tried this myself and it took some time to find the Binding syntax for this case. But here will be your code needed.)

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20"
    ToolTip="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ob:ObTabItem}}, Path=HeaderText}"/>

    So I think you have already opened an issue for this topic. We will consider to expose the property.

    Thanks for bringing up this kind of question to forum, hope others has some power of WPF which you don't get from MFC.

    Regards,

    Kiyoshi

     

    p.s. By using these Syntax, you may get an idea of this Binding.

    You will get ToolTip for header as your main MDI parent Title!

    ToolTip="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ob:ObPanel}}, Path=Title}"



  • 9.  Re: [CA Plex General Discussion] RE: Re: [CA Plex General Discussion] RE: P

    Posted Feb 05, 2014 12:00 PM
    Kiyoshi,

    If I add the following

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20"
    ToolTip="Test Tool Tip" />

    Then I can see a popup Tool Tip. However what I want to do is set the
    ToolTip content = to the text normally displayed in the tab

    The following doesn't work as I suspect we would need some code behind to
    set the template value?

    <ContentPresenter Content="{TemplateBinding Content}" MaxWidth="20"
    ToolTip="{TemplateBinding Content}" />

    Any ideas how to move forward on this?

    Regards,
    David S GAMBLE
    SOFTWARE ENGINEERING
    GSWD
    12 Calthorpe Road, Edgbaston, Birmingham, B15 1QZ, United Kingdom
    ___________________________________________________________________________________




    Phone
    INT (6044) 7604 3877 EXT +44 (0)121 4553877
    Email
    davidgamble@hsbc.com
    Website
    HTS UK IT – SE Intranet

    ___________________________________________________________________________________
    Protect our environment - please only print this if you have to!




    ************************************************************
    HSBC Bank plc
    Registered Office: 8 Canada Square, London E14 5HQ
    Registered in England - Number 14259
    Authorised by the Prudential Regulation Authority and regulated by the
    Financial Conduct Authority and the Prudential Regulation Authority
    ************************************************************


    -----------------------------------------
    SAVE PAPER - THINK BEFORE YOU PRINT!

    This E-mail is confidential.

    It may also be legally privileged. If you are not the addressee you
    may not copy, forward, disclose or use any part of it. If you have
    received this message in error, please delete it and all copies
    from your system and notify the sender immediately by return
    E-mail.

    Internet communications cannot be guaranteed to be timely secure,
    error or virus-free. The sender does not accept liability for any
    errors or omissions.