Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:29:05+00:00 2026-05-24T02:29:05+00:00

I have a listBox labeled placementTwoListBox where I have data loaded into it. The

  • 0

I have a listBox labeled placementTwoListBox where I have data loaded into it. The placementTwoListBox looks like this:

placementTwoListBox:

U3      IC-00276G   236.135  198.644  90   
U12     IC-00270G   250.610  201.594  0    
J1      INT-00112G  269.665  179.894  180  
J2      INT-00112G  269.665  198.144  180  
J6      INT-00113G  227.905  174.994  180  
J3      INT-00113G  227.905  203.244  180  
U13     EXCLUDES    242.210  181.294  180  

I also have TWO richTextBoxes labeled calculatedXRichTextBox and calculatedYRichTextBox. They look like this:

calculatedXRichTextBox:

246.135
260.610
279.665
279.665
237.905
237.905
252.210

calculatedYRichTextBox:

298.644
301.594
279.894
298.144
274.994
303.244
281.294

I am trying to replace the values in the 3rd column of placementTwoListBox with the values in calculatedXRichTextBox and replace the values in the 4th column of placementTwoListBox with the values in calculatedYRichTextBox to get the final result (and placing it back into the original ListBox) of:

placementTwoListBox (updated):

U3      IC-00276G   246.135  298.644  90   
U12     IC-00270G   260.610  301.594  0    
J1      INT-00112G  279.665  279.894  180  
J2      INT-00112G  279.665  298.144  180  
J6      INT-00113G  237.905  274.994  180  
J3      INT-00113G  237.905  303.244  180  
U13     EXCLUDES    252.210  281.294  180  

  • Does anyone know how to implement this?

EDIT:

When using these two: @CrazyDart

calculatedXRichTextBox:

758.135
772.61
791.665
791.665
749.905
749.905
764.21

calculatedYRichTextBox:

-301.356
-298.406
-320.106
-301.856
-325.006
-296.756
-318.706

The placementTwoListBox turns out to look like this:

U3      IC-00276G   758.135  -301.356666666  90   
U12     IC-00270G    772.61  -298.40666666  0    
J1      INT-00112G  791.665  -320.1066666  180  
J2      INT-00112G  791.665  -301.856666  180  
J6      INT-00113G  749.905  -325.00666  180  
J3      INT-00113G  749.905  -296.7566  180  
U13     EXCLUDES     764.21  -318.706  180  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:29:06+00:00Added an answer on May 24, 2026 at 2:29 am

    This should get you started:

            string[] lines = placementTwoListBox.Lines;
            for (int line = 0; line < lines.Length; line++)
            {
                string replacement1 = calculatedXRichTextBox.Lines[line];
                while (replacement1.Length < 7)
                {
                    replacement1 = " " + replacement1;
                }
                lines[line] = lines[line].Remove(20, 7).Insert(20, replacement1);
    
                string replacement2 = calculatedYRichTextBox.Lines[line];
                while (replacement2.Length < 7)
                {
                    replacement2 = " " + replacement2;
                }
                lines[line] = lines[line].Remove(29, 7).Insert(29, replacement1);
            }
            placementTwoListBox.Lines = lines;
    

    UPDATE: I totally missed that some are lists, not all RichTextBoxes… see updated code:

        for (int line = 0; line < placementTwoListBox.Items.Count; line++)
        {
            string replacement1 = calculatedXRichTextBox.Lines[line];
            while (replacement1.Length < 7)
            {
                replacement1 = " " + replacement1;
            }
            placementTwoListBox.Items[line] = ((string)placementTwoListBox.Items[line]).Remove(20, 7).Insert(20, replacement1);
    
            string replacement2 = calculatedYRichTextBox.Lines[line];
            while (replacement2.Length < 7)
            {
                replacement2 = " " + replacement2;
            }
            placementTwoListBox.Items[line] = ((string)placementTwoListBox.Items[line]).Remove(29, 7).Insert(29, replacement1);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have listbox like this: <ListBox Height=589 HorizontalAlignment=Left Name=AllNotesListBox VerticalAlignment=Top Width=460 SelectionChanged=AllNotesListBox_SelectionChanged> <ListBox.ItemTemplate> <DataTemplate>
I have listbox which binds data to DataTable and now I need to access
i have a listbox that is populated this way with two Databindings (Frage and
I have ListBox and want to put values in this listbox from a DataTable
I have ListBox data bind to list of users (collection): usersListBox.DataSource = null; usersListBox.DataSource
I have a ListBox in my webpage that is bound from database in this
A have ListBox and 4 Items. 2 visible 2 colpased: Click: -this bad! I
I have a ListBox or DataGrid filled with thousands of entries. I would like
I have a ListBox control that I want to change into having a toggle
I have a ListBox that has a style defined for ListBoxItems. Inside this style,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.