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

  • Home
  • SEARCH
  • 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 282767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:19:00+00:00 2026-05-12T05:19:00+00:00

i am using vsto, to work with excel-2007… let’s consider i have a matrix

  • 0

i am using vsto, to work with excel-2007…

let’s consider i have a matrix as follows

     A    B    C
 1  10   11    12
 2  10   12    11
 3  11   10    12

i will always read some random matrix filled with random numbers… ex above,
and the other condition is that they will also be colored randomly according to the
same numbers, for ex. in the above case cells which contain 10 will be colored red,
those with 11 will be colored green, and so on…

now i have to put some kind of panel on a worksheet which will show info of this kind

rectangle with RED color  - 10
rectangle with GREEN color - 11
rectangle with BLUE color  - 12

i tried to do it with charts, but unfortunately did not succeed,…
i cannot put those info on a range of cells, that’s not a solution i am
looking for
,… i have to put it on
some kind of panel, so that user will be able to drag the panel wherever they want,
..

i have no idea how to do it, please can you suggest me a way how create smth kind of
panel and to put that info there… Thanks!

sorry for not mentioning this, iwant to be able to put rectangles inside the
panel, so that whenever i move the panel all the components of the panel should move
together… also i do not want user to be able to modify the contents of the panel,
they should only be able to move the panel only…

  • 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-12T05:19:00+00:00Added an answer on May 12, 2026 at 5:19 am

    For text only, a textbox would probably do the trick.

    If you definitely need rectangles, you could construct several drawing objects: filled-in Rectangles for the coloured rectangles, textboxes for the descriptions and a Rectangle with a white background to act as a frame for the legend. Once drawn, you could Group them which would turn them into a single object from the users’ POV.

    Here’s a edited example from MSDN I’ve converted to C# and tested:

    Excel.Worksheet ex = (Excel.Worksheet)Application.ActiveSheet;
    ex.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeIsoscelesTriangle, 10, 10, 100, 100).Name = "shpOne";
    ex.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeIsoscelesTriangle, 150, 10, 100, 100).Name = "shpTwo";
    ex.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeIsoscelesTriangle, 300, 10, 100, 100).Name = "shpThree";
    object[] shapeArray = {"shpOne", "shpTwo", "shpThree"};
    Excel.ShapeRange rng = ex.Shapes.get_Range(shapeArray);
    Excel.Shape grp = rng.Group();
    

    This creates three triangles that are linked together – the user would drag them around as if a single object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.