Categories > Coding > C# >

I've made a multi tab system. But I need help making the execute button for it.

Posts: 14

Threads: 9

Joined: Apr, 2023

Reputation: 0

Posted

Any code? Really need it to make my executor if works ill put you in credits.

  • 0

SeizureSalad

i love femboys

Posts: 1016

Threads: 73

Joined: Mar, 2021

Reputation: 37

Replied

tab.selectedtab as avalonorwahtever editor

  • 0

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

Posts: 489

Threads: 39

Joined: May, 2020

Reputation: 4

Replied

You need something to get the text for the selected tab example for avalon 

public TextEditor GetTextEditor()
        {
            TabItem tabItem = this.Editors.SelectedItem as TabItem;
            return ((tabItem != null) ? tabItem.Content : null) as TextEditor;
        }

Then you just need to execute it using whatever api or what your using 

private void Execute_Click(object sender, RoutedEventArgs e)
        {
            api.SendScript(GetTextEditor().Text);
        }
  • 0

nltr | Wpf/C# & Cpp Developer Former Fluxus Administrator------------------------------------------------------------------------------------💜 Developer of Kronos ðŸ’œ

Discord

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )