Categories > Coding > C# >

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

Posts: 18

Threads: 10

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: 1159

Threads: 79

Joined: Mar, 2021

Reputation: 40

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: 533

Threads: 41

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 | Xaml & C# Developer Former Fluxus Administrator
------------------------------------------------------------------------------------
💜 Developer of Kronos ðŸ’œ

Senior Dev of Orbit

Discord

Users viewing this thread:

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