• 0

[C#] Label beside TabControl


Question

Hi all,

I am trying to place a label beside a tab control like the image(sample) below.

I placed the label but the label goes behind the tab control. These are the methods i tried to bring the control front but it is not getting displayed.

none worked


this.labelControl2.BringToFront();
[/CODE]

then i tried to invalidate for a repaint

[CODE]
this.labelControl2.Invalidate();
[/CODE]

I also tried to set the child index so that the label is the first control and will be displayed above all control like this

[CODE]
Parent.Controls[0].Controls[0].Controls[0].Controls.SetChildIndex(labelControl2, 0);
[/CODE]

A click on a hyperlink in one of the tab should invoke the label and display the name of the link on the label.

That's my requirement but i couldn't get the label displayed.

even tried to repaint the label manually.I am using dev express tabControl just an fyi.

post-312866-0-52615100-1328300508.jpg

Link to comment
https://www.neowin.net/forum/topic/1055880-c-label-beside-tabcontrol/
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I just did this myself... I added the Label control only after having added the TabControl. You can lay them on the canvas respectively; by default, they both render simultaneously as long as the tabs do not sit on top of the label.

EDIT: I now realize you're using the DevExpress TabControl. Why? That's the real problem, because it's basically a custom control. Try using the native controls first. That should have been highlighted FIRST as it's a separate control than the MSFT ones.

  • 0

Could you confirm whether thats WPF or WinForms.

Thanks

GE

Its winform build with devxpress controls.

I just did this myself... I added the Label control only after having added the TabControl. You can lay them on the canvas respectively; by default, they both render simultaneously as long as the tabs do not sit on top of the label.

EDIT: I now realize you're using the DevExpress TabControl. Why? That's the real problem, because it's basically a custom control. Try using the native controls first. That should have been highlighted FIRST as it's a separate control than the MSFT ones.

I cannot remove the devxpress tabcontrol to use native tab control. those module were already in there and i am trying to add some functionality to it.

The whole application is build on devexpress and has been here for few years now so removing them is not an option.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • FotoSketcher Studio 4.30 by Razvan Serea FotoSketcher Studio is a free creative tool that instantly turns your photos into artwork. With just a few clicks, you can apply styles like pencil sketches, watercolor, oil painting, ink drawings, cartoons, and abstract effects. Powerful yet simple sliders let you adjust every detail to match your vision, from subtle enhancements to bold artistic transformations. You can also improve your images with tools for contrast, sharpness, color, and brightness, plus add frames and text. It supports JPEG, PNG (including transparency), BMP, and WebP formats for both opening and exporting. Available for Windows (64-bit) and macOS (Apple Silicon and Intel), FotoSketcher also offers batch processing, manual retouching, and custom effects for advanced users. Completely free, including commercial use, with no ads or spyware. FotoSketcher Studio 4.30 changelog: New LUTs effect In the Photo Lab category you will find a new LUTs (Lookup Tables) effect for custom colour grading. It comes with 18 presets built right into the application (Cinematic, Kodachrome, Golden hour, Portrait and more), each with a live preview so you can see the look before applying it. Right-click the preview to compare with your original image. And if you have your own .cube files, you can load those from disk too. New "Stylize" category Added a brand-new Stylize category with four new effects. Three of them (Mosaic, Circles and Triangles) are built on the same space-filling idea, turning your photo into tiled mosaics, clusters of circles, or a low-poly triangle look. The fourth, Cartoon, is a bit different: it gives a clean graphic style with defined lines and solid colours. A little tip - set the colour intensity to 0 and Cartoon draws a pure outline drawing with no fill. Combined with the "Do not erase background" option, you can run it on top of any other effect to add crisp contours in two quick steps. Auto-Enhance and Full Reset Two small but handy additions. Auto-Enhance (just press E) tries to optimise your source photo - exposure, white balance, local contrast - for a 'dehazed', natural-looking starting point. And Full Reset clears everything back to a clean slate in one step (working image, history, LUT, script, brushes and sliders) without having to close and reopen the program. Press Ctrl+Shift+N, or right-click the exit button. Scripts The script engine has been updated to support all the new effects, with a few new commands and improved help. If you would like some inspiration, the recent scripting tutorial on this blog walks through several ready-made example scripts. The usual improvements The interface now uses new colour accents for better readability, the history gallery has had a few tweaks, and you can now open .webp images directly. On top of that, this release includes some performance improvements and a good number of bug fixes. Download: FotoSketcher Studio 4.30 | 55.9 MB (Freeware) Download: FotoSketcher Studio for macOS | 119.0 MB View: FotoSketcher Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I have a Motorola, one of the lower end ones, it works fine. It is possible to get rid of the Gemini app and also to disable googles assistant , but A.i is still apps. I try to avoid all LLM A.I, is i can, I use no Ai duck duck go.
  • Recent Achievements

    • Conversation Starter
      sumytbe earned a badge
      Conversation Starter
    • One Year In
      B4dM1k3 earned a badge
      One Year In
    • One Year In
      DarkWun earned a badge
      One Year In
    • Dedicated
      Almohandis earned a badge
      Dedicated
    • Dedicated
      JuvenileDelinquent earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      519
    2. 2
      +Edouard
      189
    3. 3
      PsYcHoKiLLa
      87
    4. 4
      Michael Scrip
      81
    5. 5
      Steven P.
      72
  • Tell a friend

    Love Neowin? Tell a friend!