Page 1 of 1

Hiding tabs

Posted: Tue Jan 03, 2006 10:00 pm
by 9637403
I have downloaded your latest maintenance release and find the following problem with hiding tabs. I wish to hide the tab that lists the current series (not the actual series tab) I don't want users to be able to add,delete,clone and change order of existing series. To do this I have assumed that it is the GENERAL tab that should be hidden (assumed because there is little documentation to indicate which tab is which). I use the following code, all the other tabs PRINT, TOOLS etc hide ok however the GENERAL tab remains visible. I also wish to hide the data source for each series, this also is not working!

Code: Select all

Private tcEHiddenTabs(7) As Steema.TeeChart.Editors.ChartEditorTabs


tcEHiddenTabs(0) = Steema.TeeChart.Editors.ChartEditorTabs.General
         tcEHiddenTabs(1) = Steema.TeeChart.Editors.ChartEditorTabs.Themes
         tcEHiddenTabs(2) = Steema.TeeChart.Editors.ChartEditorTabs.Print
         tcEHiddenTabs(3) = Steema.TeeChart.Editors.ChartEditorTabs.Export
         tcEHiddenTabs(4) = Steema.TeeChart.Editors.ChartEditorTabs.Tools
         tcEHiddenTabs(5) = Steema.TeeChart.Editors.ChartEditorTabs.Data
         tcEHiddenTabs(6) = Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource
         tcEHiddenTabs(7) = Steema.TeeChart.Editors.ChartEditorTabs.Page

         tcE.HideTabs = tcEHiddenTabs
I raised this problem some time ago and I note that the change log for this latest release indicates that is has been fixed, am I doing something wrong?

Posted: Wed Jan 04, 2006 8:19 am
by Chris
Hi Adrian,

Are you quite sure that this hasn't been fixed? Using TeeChart for .NET v2.0.2179.21171 and the following code:

Code: Select all

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Editor1.Chart = TChart1
        Line1.FillSampleValues(20)

        'Dim tcEHiddenTabs(15) As Steema.TeeChart.Editors.ChartEditorTabs
        'tcEHiddenTabs(0) = Steema.TeeChart.Editors.ChartEditorTabs.General
        'tcEHiddenTabs(1) = Steema.TeeChart.Editors.ChartEditorTabs.Page
        'tcEHiddenTabs(2) = Steema.TeeChart.Editors.ChartEditorTabs.Print
        'tcEHiddenTabs(3) = Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource
        'tcEHiddenTabs(4) = Steema.TeeChart.Editors.ChartEditorTabs.Tools
        'tcEHiddenTabs(5) = Steema.TeeChart.Editors.ChartEditorTabs.Main
        'tcEHiddenTabs(6) = Steema.TeeChart.Editors.ChartEditorTabs.Aspect
        'tcEHiddenTabs(7) = Steema.TeeChart.Editors.ChartEditorTabs.Axes
        'tcEHiddenTabs(8) = Steema.TeeChart.Editors.ChartEditorTabs.Export
        'tcEHiddenTabs(9) = Steema.TeeChart.Editors.ChartEditorTabs.Legend
        'tcEHiddenTabs(10) = Steema.TeeChart.Editors.ChartEditorTabs.Panel
        'tcEHiddenTabs(11) = Steema.TeeChart.Editors.ChartEditorTabs.Series
        'tcEHiddenTabs(12) = Steema.TeeChart.Editors.ChartEditorTabs.Themes
        'tcEHiddenTabs(13) = Steema.TeeChart.Editors.ChartEditorTabs.Titles
        'tcEHiddenTabs(14) = Steema.TeeChart.Editors.ChartEditorTabs.Walls
        'tcEHiddenTabs(15) = Steema.TeeChart.Editors.ChartEditorTabs.Data

        Dim tcEHiddenTabs(6) As Steema.TeeChart.Editors.ChartEditorTabs
        tcEHiddenTabs(0) = Steema.TeeChart.Editors.ChartEditorTabs.General
        tcEHiddenTabs(1) = Steema.TeeChart.Editors.ChartEditorTabs.Page
        tcEHiddenTabs(2) = Steema.TeeChart.Editors.ChartEditorTabs.Print
        tcEHiddenTabs(3) = Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource
        tcEHiddenTabs(4) = Steema.TeeChart.Editors.ChartEditorTabs.Tools
        tcEHiddenTabs(5) = Steema.TeeChart.Editors.ChartEditorTabs.Main

        Editor1.HideTabs = tcEHiddenTabs
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Editor1.Title = "My Application Title"
        Editor1.ShowModal()
    End Sub
Gives me the following:

Image

Is this correct for you?

Posted: Fri Jan 06, 2006 5:40 am
by 9637403
Hi Christopher,
In your example you are hiding the entire main tab, I want the main tab visible but want to hide the general sub tab of the main tab. I'm assuming the general sub-tab is the one that allows new series to be added.

Also in your example the seriesdatasource tab is supposed to be hidden, but it's not in your screen shot.

So, in answer to your question, Yes I am sure it hasn't been fixed.

Cheers..

Posted: Mon Jan 09, 2006 12:25 pm
by Chris
Hello Adrian,
In your example you are hiding the entire main tab, I want the main tab visible but want to hide the general sub tab of the main tab. I'm assuming the general sub-tab is the one that allows new series to be added.
No, it's not. The general sub-tab is the tab labelled "General", next to the tab named "Axes", which can be seen under the Main tab. If you are in doubt as to which tab is which you can always use the Steema.TeeChart.Editor.DefaultTab property.

In order to have the Main tab visible but to stop users adding series to a chart, you should be using the Steema.TeeChart.Editor.Options property, e.g.

Code: Select all

        Dim tcEHiddenTabs(5) As Steema.TeeChart.Editors.ChartEditorTabs
        tcEHiddenTabs(0) = Steema.TeeChart.Editors.ChartEditorTabs.Themes
        tcEHiddenTabs(1) = Steema.TeeChart.Editors.ChartEditorTabs.Print
        tcEHiddenTabs(2) = Steema.TeeChart.Editors.ChartEditorTabs.Export
        tcEHiddenTabs(3) = Steema.TeeChart.Editors.ChartEditorTabs.Data
        tcEHiddenTabs(4) = Steema.TeeChart.Editors.ChartEditorTabs.Page
        tcEHiddenTabs(5) = Steema.TeeChart.Editors.ChartEditorTabs.Tools
        Editor1.HideTabs = tcEHiddenTabs

        Dim tcEOptions(1) As Steema.TeeChart.Editors.ChartEditorOptions
        tcEOptions(0) = Steema.TeeChart.Editors.ChartEditorOptions.Help
        tcEOptions(1) = Steema.TeeChart.Editors.ChartEditorOptions.Title
        Editor1.Options = tcEOptions
Also in your example the seriesdatasource tab is supposed to be hidden, but it's not in your screen shot.
Yes indeed, you are right. I don't think this has been recognised as a defect before and I have already fixed for the upcoming debug build release.

Posted: Mon Jan 09, 2006 9:53 pm
by 9637403
I'm getting confused now.

I want to hide the tab that lists the currently defined series and allows new series to be added, series to be changed etc.

The top row of tabs I want "Chart" and "Series", when the "Chart" tab is selected I DON'T want the "Series" sub tab. I the only tabs I want to see under the "Chart" tab are "Panel", "Axis" "Title", "Walls", "Legend", and "3D" I can't seem to get this combination to work.

Am I missing something?

Posted: Tue Jan 10, 2006 8:42 am
by Chris
Hello Adrian,
The top row of tabs I want "Chart" and "Series", when the "Chart" tab is selected I DON'T want the "Series" sub tab. I the only tabs I want to see under the "Chart" tab are "Panel", "Axis" "Title", "Walls", "Legend", and "3D" I can't seem to get this combination to work.
This is because that combination has yet to exist. I've just added an extra value to the enum ChartEditorTabs which I've called SeriesList; this value will enable you to specify the tab you refer to thus:

Code: Select all

         Dim tcEHiddenTabs(8) As Steema.TeeChart.Editors.ChartEditorTabs
        tcEHiddenTabs(0) = Steema.TeeChart.Editors.ChartEditorTabs.Themes
        tcEHiddenTabs(1) = Steema.TeeChart.Editors.ChartEditorTabs.Print
        tcEHiddenTabs(2) = Steema.TeeChart.Editors.ChartEditorTabs.Export
        tcEHiddenTabs(3) = Steema.TeeChart.Editors.ChartEditorTabs.Data
        tcEHiddenTabs(4) = Steema.TeeChart.Editors.ChartEditorTabs.Page
        tcEHiddenTabs(5) = Steema.TeeChart.Editors.ChartEditorTabs.Tools
        tcEHiddenTabs(6) = Steema.TeeChart.Editors.ChartEditorTabs.SeriesDataSource
        tcEHiddenTabs(7) = Steema.TeeChart.Editors.ChartEditorTabs.General
        tcEHiddenTabs(8) = Steema.TeeChart.Editors.ChartEditorTabs.SeriesList
        Editor1.HideTabs = tcEHiddenTabs
Giving you the following results:

Image

and

Image

Can you please confirm that this is what you're after? If so, I will include this change in the next debug release. In the meantime, you should be able to display this tab with it's functionality reduced through the use of the Steema.TeeChart.Editor.Options property as I've mentioned to you.

Posted: Tue Jan 10, 2006 9:55 am
by 9637403
Yes, thats exactly what I'm after. Can you give an indication of when the next debug release will be available?

Posted: Tue Jan 10, 2006 9:59 am
by Chris
Hello Adrian,
Can you give an indication of when the next debug release will be available?
All being well, I'll try and get one out for you before the end of this week.