Categories > Coding > C# >
How do you make a tab system.
Posted
I know exploits like Nihon, Coco and Electron have a little tab system, I wanna see how to do it myself. Any feedback is appreciated :D
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
Replied
skid
jk lol
don't skid
Cancel
Post
Replied
@Moon i hope not to, but who knows, maybe i wake up drinking retard juice and skidded
Cancel
Post
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
Replied
@Explanation ill
giv u the recepie
yes speling vari good
so first u take sum orange juice and u write the word retard on the cu p and then you eat it viola
Cancel
Post
Replied
This is fairly simple to do and can be done as far as I know three ways. i presonally use and highly recommend method number 2 but yea
-------------method 1
You would need one tab control and a list of arrays
on a tab deselecting you would add to the list an array
this array would have an index 0 being either the tab index or the tab title and index 1 being the text to be stored
on tab select, you would simply iterate thru the list and check to see if the array index 0 matches the tab index or name then set the text
pros of this method -
it works thats about the only good
cons -
its dumb and overcomplicated
uses more code than whats needed
----------------method 2
This is my personal favorite way of doing this and its great.
Step one get one tab control
Step two get your text editor of choice
Step three use the tab page tags.
Step four profit.
how this works - tab pages are treated as there own control meaning they have tags but what are tags? well tags are commonly used to
store data closely related to that control and well why dont we use the tag to well idk store some data. all you would have to do is check if the tag isnt null on tab selecting and if it isnt null then set the text and boom done no need for complex code and for saving the text? well same thing on tab deselecting just set the tag value to the text and booom done.
pros -
super simple to code
can be codded in like idk 5-10 lines of code total
only uses one text editor
super simple to add and supports every text editor.
reliable
cons -
i litterally cant think of any cons
-----------method 3
this is the popular method everyone uses for some reason over the tag method so this is what it is
you create a new instance of the text editor and dock it to the tagpage thats it
in theory yea its simple but the tag method is 100x superior due to the fact this method is harder to code
and in most cases your going to be using a monaco or ace and if you use chromium then say bye bye to your ram(ive tested this)
so yea all in all this is popular because everyone does it not because its practical and simple
pros -
you can find code for it everywhere
everyone uses this method
reliable
cons -
creates a new instance of the control every time you make a new tabpage which isnt very poggers
harder to code
kinda gay ngl
Cancel
Post
Was on WRD front page
Programs I own - Synapse X, Protosmasher, Sirhurt, Sweat Heart of Sigma Chi, Scriptware V2
Languages I know - C#,JS,Lua,VB.net
Learning - Python, C
Was on WRD front page
Programs I own - Synapse X, Protosmasher, Sirhurt, Sweat Heart of Sigma Chi, Scriptware V2
Languages I know - C#,JS,Lua,VB.net
Learning - Python, C
Replied
i got some trouble wit dis, can u like put the code for 2nd method in like a pastebin or somethn, i couldnt understand a word u said
Cancel
Post
I am a used-to-be programmer, now producer, rapper and artist
https://cdn.discordapp.com/attachments/593162491085979649/926285159047770152/visuals-000415636677-YGc9rS-t2480x520_1.jpg
Replied
yoink from an open sourced Synapse X Custom UI, big brain moves
Cancel
Post
Discord : Doctor Doom#0550
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post