Giter Club home page Giter Club logo

Comments (7)

ButchersBoy avatar ButchersBoy commented on July 21, 2024

ok...taking a look...

from dragablz.

kogare avatar kogare commented on July 21, 2024

whoa fast reply, it actually doesn't work when I put it in this statement, sorry for incomplete information

            foreach (Dragablz.TabablzControl tabablzControl in Controllers.Windows.Windows.FindVisualChildren<Dragablz.TabablzControl>(this))
            {
                foreach (TabItem aTabItem in tabablzControl.Items)
                {
                    if (aTabItem.Name.Equals("aTabItem"))
                    {
                        aTabItem.IsSelected = true;
                    }
                }
            }

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

You caught me at a good time, I was just getting on the computer!

from dragablz.

kogare avatar kogare commented on July 21, 2024

ah cool.. also when adding new tabitem via code and then selecting it via selectedindex generate same issue, content changed but the header still selecting first tabitem. here's my code.

TabItem aTabItem = new TabItem();
aTabItem.Name = "aTabItem";
aTabItem.Header = "Second Tab";
aTabItem.AllowDrop = true;

mainTabControl.Items.Insert(mainTabControl.Items.Count, aTabItem);
mainTabControl.SelectedIndex = mainTabControl.Items.Count - 1;

i've tried many things without changing your library but ended up with nothing :(

cheers..

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

OK, same fix fixes both problems. Small thing though, when you do .Insert(), TabablzControl is "cleverly" putting the new tab next to the currently selected tab (and not at the end which is kinda implied by your example). If this is an issue for you raise another issue and I'll take a look in due course.

Fix is checked into GitHub and look for build 0.0.0.101 on NuGet. Let me know if it works for you and I'll close the issue.

Thanks,

James

from dragablz.

kogare avatar kogare commented on July 21, 2024

Great, I can now select TabItem properly with both IsSelected and SelectedIndex.
Do you mean that index parameter in .Insert() doesn't have any effect, adding new TabItem will put it straight to the next of current selected tab ignoring index parameter?

Cheers

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

Yep that's what I meant. I close this issue.

from dragablz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.