T O P I C R E V I E W |
additive |
Posted - 06/20/2010 : 10:12:09 AM Origin Ver. 8.1 and Service Release 2 Operating System: Windows XP
Hello, can you reproduce this unexpected behavior? Deleting a worksheet column does only delete its content, while keeping width of all columns as before. I would expect that the width attribute is deleted as well. Thus, column width shift all over the worksheet.
void DemoDeleteColBug()
{
Worksheet wks;
wks.Create();
wks.AddCol();
wks.Columns(1).SetWidth(3);
int iColIndex = 0;
wks.DeleteCol(iColIndex,WKSDELETECOL_LEAVE_OPER_RANGES );
}
|
7 L A T E S T R E P L I E S (Newest First) |
MicrosoftCRM |
Posted - 07/28/2010 : 06:17:58 AM I was running into the same thing.
Thanks for your post.
[url=http://www.rbdata.com] Microsoft CRM [/url] [url=http://www.rbdata.com/goldmine-software.htm] GoldMine Software [/url] [url=http://www.rbdata.com/microsoft-crm-4-0.htm] MS CRM [/url]
|
Penn |
Posted - 07/07/2010 : 01:09:58 AM Hi,
Yes, it is a bug, and we will try to fix it in our future version. Thank you for reporting this. By the way, the bug you reported before has been fixed in our in-house build.
Penn |
additive |
Posted - 07/06/2010 : 5:27:20 PM Hi Penn,
i've found another bug concerning column width. Setting column width requires the worksheet to be displayed in the active folder. When another folder is active and SetWidth() is applied to a worksheet in an inactive folder, SetWidth() does not show any effect.
Changing the active folder several times during runtime would be a bad workaround because it results in a flickering screen which is annoying for the user.
/ Michael |
Penn |
Posted - 06/24/2010 : 11:26:49 PM Hi,
Yes, it is a bug. Thank your for reporting this. We will try to fix it. For now, you can delete the column you want to delete, and then set width of the column. For example:
void test_del_col()
{
Worksheet wks;
wks.Create("Origin");
Column colB(wks, 1);
colB.SetWidth(3.0);
double dWidth = colB.GetWidth();
wks.DeleteCol(0);
colB.SetWidth(dWidth);
}
Penn |
additive |
Posted - 06/24/2010 : 05:01:29 AM Hi Penn, excuse me for the imprecise description. As I tried to explain with my second post, the problem has nothing to do with the WKSDELETECOL_LEAVE_OPER_RANGES option; which I just tried to figure out if it could help.
Please regard the following example: 1. Create a worksheet containing two columns, A and B. 2. Set column width of column B to 3. 3. Delete column A using wks.DeleteCol(0);
Now, column B remains, but has lost its original column width of 3. It has the width of column A.
|
Penn |
Posted - 06/21/2010 : 01:41:53 AM Hi,
It is not a bug. The bit WKSDELETECOL_LEAVE_OPER_RANGES does not work like the way you did. It is useful for those columns with Recalculate mode.
For example, there are two columns with row numbers in the active worksheet, and then smooth them by selecting menu Analysis> Signal Processing> Smooth. In the open dialog, set Recalculate to "Auto" and Output to "(<new>,<new>)", click the OK button and get two result columns with locks in the active worksheet. The following function is used to delete the fourth column and keep the lock on the third column.
void DemoDeleteColBug()
{
//Worksheet wks;
//wks.Create();
//wks.AddCol();
//wks.Columns(1).SetWidth(3);
Worksheet wks = Project.ActiveLayer();
int iColIndex = 3;
wks.DeleteCol(iColIndex,WKSDELETECOL_LEAVE_OPER_RANGES );
}
We have updated the document.
Penn |
additive |
Posted - 06/20/2010 : 10:15:16 AM Second argument of DeleteCol() is not required.
void DemoDeleteColBug()
{
Worksheet wks;
wks.Create();
wks.AddCol();
wks.Columns(1).SetWidth(3);
int iColIndex = 0;
wks.DeleteCol(iColIndex);
}
|