F
Florian Kock
Hi again!
I ran into another problem with the spreadsheet. I'm using the COM
interface, encapsulated by Qt. Therefore, I can't use any managed
extensions, MFC or VBA. It is all in C++.
Now, I want to make the first column and the first row fixed, so that they
are always visible, regardless of how much the user scrolls.
In VBA, I found a nice little method (or better, two). The first one is
SplitColumn (and SplitRow respectively), which splits the pane at the given
index. After calling both methods, it is then possible to call FreezePanes
and the table behaves exactly as I wanted.
But when I tried to do the same in C++, I couldn't find a method like
SplitRow. So I'm wondering, is there such a method that is exposed by the
interface?
However, I discovered that FreezePanes takes an argument that indicates
where the splitter shall be positioned. It is the enum SheetFreezePanesEnum,
which has values for top, bottom, left, right and none (while right and
bottom are marked to be for future use).
The problem is: After the first call of the method (to split the column),
the pane is already fixed, and I can't get it to split again so that the
row, too, is fixed. I tried to 'OR ' the argument with the values of left
and top, but it wouldn't work.
So my question is: how can I split the Columns AND the Rows and fix them?
Any help is greatly appreciated!
Greetings,
Florian Kock
I ran into another problem with the spreadsheet. I'm using the COM
interface, encapsulated by Qt. Therefore, I can't use any managed
extensions, MFC or VBA. It is all in C++.
Now, I want to make the first column and the first row fixed, so that they
are always visible, regardless of how much the user scrolls.
In VBA, I found a nice little method (or better, two). The first one is
SplitColumn (and SplitRow respectively), which splits the pane at the given
index. After calling both methods, it is then possible to call FreezePanes
and the table behaves exactly as I wanted.
But when I tried to do the same in C++, I couldn't find a method like
SplitRow. So I'm wondering, is there such a method that is exposed by the
interface?
However, I discovered that FreezePanes takes an argument that indicates
where the splitter shall be positioned. It is the enum SheetFreezePanesEnum,
which has values for top, bottom, left, right and none (while right and
bottom are marked to be for future use).
The problem is: After the first call of the method (to split the column),
the pane is already fixed, and I can't get it to split again so that the
row, too, is fixed. I tried to 'OR ' the argument with the values of left
and top, but it wouldn't work.
So my question is: how can I split the Columns AND the Rows and fix them?
Any help is greatly appreciated!
Greetings,
Florian Kock