[program-l] Reading WPF TextBox With jaws Problem

  • From: Rick USA <richardrthomas48@xxxxxxxxx>
  • To: "Program-L@Freelists. Org" <program-l@xxxxxxxxxxxxx>
  • Date: Fri, 14 Jan 2022 16:35:54 -0500

Hi (WPF XAML) Folk:

I am trying to display a window having 1 multi-line textbox and 1 (ok) button and am stuck.

The Dialog Window (md) comes up when the main window button is clicked but the dialog window textbox is not working properly.

Jaws will only read the first letter of the first word on the first line when i press the right arrow key over and over.

It reads the first line if I press the down arrow key over and over as well.

There are suppose to be 3 lines in the TextBox but narrator reads them as if they are on a single line when I can get it to read so the lines are there.

From much reading I believe this should be working but it is not working, sigh.

And, since jaws will not even read the letters in the textbox using the read next character (>) key it seems something is really wrong but so far I have not figured out anything.

I am not even sure if this part of (wpf) and (xaml) is actually accessible so am asking for some input from experience if possible.

Can you scan the below code  and let me know if you see anything wrong or if you have any insights I might follow up with?

[Note … means some lines were removed for brevity and I don’t think they play a role in the problem]

Here is the code in the Main window which just has a button to   instantiate and call the (md) dialog window.

<Window x:Class="EdgarWPF.MainWindow"

...

        mc:Ignorable="d"

        Title="MainWindow" Height="764" Width="1024">

    <Grid>

    <Grid.RowDefinitions>

        <RowDefinition Height="300" />

    </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>

            <ColumnDefinition Width="700" />

        </Grid.ColumnDefinitions>

           <Button x:Name="TestButton" Margin="0,5,0,0" Click="TestButton_Click">Run Test</Button>

    </Grid>

</Window>

[And here is the code behind which instantiates and calls the (md) dialog window:

using System;

...

namespace EdgarWPF

{

    public partial class MainWindow : Window

    {

        public MainWindow()

        {

            InitializeComponent();

        }

        private void TestButton_Click(object sender, RoutedEventArgs e)

        {  

string tstMessage = "First line. \r\n";

                tstMessage += "Second Line. \r\n";

                tstMessage += "Third line.";

            var _md = new md();

            _md.msgTextBox.Text = tstMessage;

            _md.ShowDialog();

...

 

xxxxx

[Here is the dialog window which holds the TextBox I am trying to display:

<Window x:Class="EdgarWPF.md"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

...

        mc:Ignorable="d"

        Title="md" Height="764" Width="1024">

    <Grid Margin="1,0,-1,0">

        <Grid.RowDefinitions>

            <RowDefinition Height="Auto" />

            <RowDefinition Height="Auto" />

        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>

            <ColumnDefinition Width="Auto" />

        </Grid.ColumnDefinitions>

                <TextBox x:Name="msgTextBox" IsReadOnly="True" Text="Default Text" TextWrapping="Wrap" MaxLines="5" />

 

            <Button x:Name="OKButton" Margin="0,5,0,0" Click="OKButton_Click">OK</Button>

    </Grid>

</Window>

Thanks for any pointers:

Richard R. Thomas (Rick USA)

Sent from Mail for Windows

 

** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts:

  • » [program-l] Reading WPF TextBox With jaws Problem - Rick USA