Categories > Coding > C# >
I've made a multi tab system. But I need help making the execute button for it.
Posted
Any code? Really need it to make my executor if works ill put you in credits.
Replied
tab.selectedtab as avalonorwahtever editor
Cancel
Post
"Questionable intellegence, but I like the mystery" - CubeFaces
https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png
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);
}
Cancel
Post
nltr | Wpf/C# & Cpp Developer | Former Fluxus Administrator------------------------------------------------------------------------------------💜 Developer of Kronos 💜
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post