Author Topic: TabControl design  (Read 3083 times)

0 Members and 1 Guest are viewing this topic.

Offline Code.Illusionist

  • Royal Highness
  • ****
  • Posts: 687
  • Cookies: 39
  • Compile or die trying
    • View Profile
TabControl design
« on: November 05, 2013, 05:42:42 pm »
Hey there, I was wondering how people change their own tabControl design. I saw some of them use drawing system but none of them really explained well how to implement or where to use such peace of code. For example this:
Code: [Select]
http://stackoverflow.com/questions/7416062/custom-tab-control-in-windows-forms
Vae Victis - suffering to the conquered

Offline Zesh

  • Royal Highness
  • ****
  • Posts: 699
  • Cookies: 42
    • View Profile
Re: TabControl design
« Reply #1 on: November 05, 2013, 09:24:59 pm »

Offline Code.Illusionist

  • Royal Highness
  • ****
  • Posts: 687
  • Cookies: 39
  • Compile or die trying
    • View Profile
Re: TabControl design
« Reply #2 on: November 06, 2013, 01:23:26 am »
Did you check out this link?

http://www.codeproject.com/Articles/20732/Custom-Tab-control-Revised

I am reading it and still don't get it. Either my knowledge of English language is lame or somehow I miss the point what that guy is doing over there. I can see he provided source code where we could style our own tabs, but what he missed to tell us is where we implement such thing? Nothing is detailed explained.
Vae Victis - suffering to the conquered

Offline ArkPhaze

  • Peasant
  • *
  • Posts: 136
  • Cookies: 20
  • null terminated
    • View Profile
Re: TabControl design
« Reply #3 on: November 06, 2013, 03:49:48 am »
What have you done with GDI before? What have you done with inheritance before? If you haven't done either of these, forget about making a tab control and try learning these concepts first. It's quite easy to make your own control, but you need to understand a couple things first.
sig=: ArkPhaze

[ J/ASM/.NET/C/C++ - Software Engineer ]

Offline Code.Illusionist

  • Royal Highness
  • ****
  • Posts: 687
  • Cookies: 39
  • Compile or die trying
    • View Profile
Re: TabControl design
« Reply #4 on: November 06, 2013, 11:03:06 am »
What have you done with GDI before? What have you done with inheritance before? If you haven't done either of these, forget about making a tab control and try learning these concepts first. It's quite easy to make your own control, but you need to understand a couple things first.
I never head touch with such field. So, I guess time to learn it =)
Vae Victis - suffering to the conquered

Offline ArkPhaze

  • Peasant
  • *
  • Posts: 136
  • Cookies: 20
  • null terminated
    • View Profile
Re: TabControl design
« Reply #5 on: November 07, 2013, 12:54:52 am »
Here's an example of something random I did with GDI in C# a while back:


It doesn't need to even be a control. Just see what you can draw. This one I did was animated, and it draws a spiral outwards. To create the positioning, I used some math involving the golden ratio.

I even created a simulated pong game in GDI a few months ago:


I've made graphing controls, buttons, textbox controls and many others as well. It's more of a creativity thing though after you know what you're doing.
« Last Edit: November 07, 2013, 12:57:55 am by ArkPhaze »
sig=: ArkPhaze

[ J/ASM/.NET/C/C++ - Software Engineer ]

Offline Code.Illusionist

  • Royal Highness
  • ****
  • Posts: 687
  • Cookies: 39
  • Compile or die trying
    • View Profile
Re: TabControl design
« Reply #6 on: November 07, 2013, 10:11:57 am »
You did pretty nice job right there, I like it. I started learning part =)


EDIT: I found this: http://www.c-sharpcorner.com/uploadfile/mahesh/c-sharp-tabcontrol/ but problem is I don't know how to access that class where he type all this code. None of them ever mention how they get there before editing. Does some of you know how to?

EDIT2: Found it =)
« Last Edit: November 07, 2013, 10:39:52 am by Code.Illusionist »
Vae Victis - suffering to the conquered

Offline ArkPhaze

  • Peasant
  • *
  • Posts: 136
  • Cookies: 20
  • null terminated
    • View Profile
Re: TabControl design
« Reply #7 on: November 08, 2013, 12:32:54 am »
It is nice, but there's nothing about GDI in there, just FYI.
sig=: ArkPhaze

[ J/ASM/.NET/C/C++ - Software Engineer ]