Options

MultiLine Textboxes in RTC

hens61hens61 Member Posts: 3
edited 2011-02-01 in NAV Three Tier
I put a multiline textbox into a Form and viewed it in the RTC. I noticed that there's a great difference in how this Textbox is displayed in the Classic and the RTC Client. In the RTC Client there are a maximum of 3 lines displayed. To see more you a have to use the scroll bar. This is not dramatical but a little bit annoying.
My question is: Is there any possibility to show a greater block then the 3 lines in the RTC?

Thanks for your help in advance

Comments

  • Options
    kinekine Member Posts: 12,562
    Yes, by using addin... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    hens61hens61 Member Posts: 3
    kine

    Thank you for the information.

    Using addins is a way I prefer to avoid. And I'm looking for a solution that works for both the classic client and the RTC or is the addin you are thinking of working that way.

    Thanks for a more concrete answer in advance.
  • Options
    kinekine Member Posts: 12,562
    If you try e.g. my UniWPF addin, you can easilly add the editbox with properties as you wish with this XML:
    <Root>
      <Element>
        <Grid Name="grid1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" >
          <TextBox Height="{Binding ElementName=grid1, Path=ActualHeight}" HorizontalAlignment="Left" 
             Name="textBox1" VerticalAlignment="Top" Width="{Binding ElementName=grid1, Path=ActualWidth}"
             AcceptsReturn="True" TextWrapping="Wrap" >
    My text inside the editbox
          </TextBox>
        </Grid>
      </Element>
    <Addin AllowCaption="False"/>
    <SetEvent Object="textBox1" Name="LostFocus"/>
    </Root>
    

    It will create textbox which will resize based on the page size. If you want to have it editable, you can react on the LostFocus event and read the data from the textbox e.g. by this xml:
    <Root>
    <!-- some random guid to make the request unique each time -->
    <GetProperty Object="textBox1" Name="Text" />
    </Root>
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    SanSan Member Posts: 6
    Hello Kamil,

    I followed those posts with interest. But to understand it completely: Where do I have to add this code? Have you maybe a finished example where I could have a look at? It might be easier to understand...

    Thanks in advance!
  • Options
    kinekine Member Posts: 12,562
    Just download the UniWPF addin (http://www.mibuso.com/dlinfo.asp?FileID=1195), instead the demo data in the code, fill the mentioned XML. You can fill the data into the addin in different ways (through XMLDom etc.). The Addin is connected to some field/variable. This variable should be BigText, you just fill this variable with the XML. It will create the textbox automatically. After that, you can "communicate" with the addin through the variable, and it "answers" with the addin event with data.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.