01-14-2015 07:44 AM
Dear,
I would like to move out the relief of a bouton in labwindows.
I would like to see a "flat button", like the button in Figure 1, compared to the one in the Fgure 2 (image File attached).
I would like please to know which attributes I can modif to have this style of button ?
I used the "windows style" attribute, which is fine, but I cannot set colors that I need for objects. For example, with the "windows style" attribute of a Panel, the font of the TAB objects are forced to gray.
So I would like to have flat buttons (without reliefs, like shown in Figure 1), while continuing to have a control of colors for insered objects.
Thank you so much for yours answer.
Best regards,
--
hapiest
Solved! Go to Solution.
01-14-2015 08:13 AM
You might want to try the 'Classic Style' controls.
If you want to use your own colors you have to uncheck 'Conform to System Colors' and 'Use Windows Visual Styles for Controls' in the 'Other Attributes' panel of the 'Edit Panel' panel.
01-14-2015 08:29 AM
I used both:
uncheck 'Conform to System Colors' and
check 'Use Windows Visual Styles for Controls'
but the colors of TAB object is forced to gray when the TAB is insered in the PANEL object. I need to still have a control of colors for the insered TAB, but I do not know how?
Could you please tell me how?
Thank you in advance.
Best regards,
--
hapiest
01-14-2015 08:39 AM
@hapiest wrote:
I used both:
uncheck 'Conform to System Colors' and
check 'Use Windows Visual Styles for Controls'
You have to
- uncheck 'Conform to System Colors'
and
- uncheck 'Use Windows Visual Styles for Controls'
Then you can color your buttons as you wish...
01-14-2015 08:49 AM
Use Windows Visual Style for Controls attribute is stronger than Conform to System: that's why your tab control still looks gray.
If you want to customize the appearance of the tab control you need to abandon Windows style. This can be done at panel level in the UIR editor as Wolfgang suggested or can be done programmatically for a single control (e.g. your tab control) by calling SetCtrlAttribute with ATTR_DISABLE_PANEL_THEME attribute. Customization of the tab control must then be done programmatically by setting all the attributes you need.
As a guidance, you may want to take a look at the UI to Code Converter item in the Tools menu: given a UIR file and selected one or more panels to elaborate, the tool will return a source file with the instructions to programmatically generate from scratch the panel and all controls together with all customizations needed: from this code file you can extract the instructions needed to customize your tab control. You can run the tool against a panel set with no conformance to windows theme and with the exact tab control you want to have on the screen. Attached a very simple panel and the corresponding source file generated by the tool.
01-14-2015 10:41 AM
Thnak you for your suggestion, I still have not resolved the issue.
I have unchecked the follwing:
- uncheck 'Conform to System Colors'
and
- uncheck 'Use Windows Visual Styles for Controls'
But, I the issue is that I need to have a "flat button", as shown in the figure I have attached in the first post.
When the "Use Windows Visual Styles for Controls" is unchecked, the button is "not flat", which is not needed.
Is there a way to have a "flat button", with still controling the colors of the objects?
Thak you so much for your answer.
Best regards,
--
Hapiest
01-14-2015 10:57 AM
What about my earlier suggestion (You might want to try the 'Classic Style' controls)?
01-15-2015 02:41 AM
It is much better with the 'Classic Style', but I see reliefs(delimitation of the button with an other color) in the borders of the 'Classic Style' button. I woul like to have a flat button, wich have same proporeties as the Panel insered in.
As you see in the Figure 1, there is some reliefs in the borders of the button, but it is much better than the button in Figure 2 (file attached).
Is there a way to move out reliefs of the button in figure 1 (the button with the "Classic style")?
Thank you in advance for your answer.
Best regards,
--
hapiest
01-15-2015 03:22 AM
... if there is no relief how will you know that there is a button and not just a label?
In any case you could change the color of the button to transparent...
01-15-2015 03:31 AM
Thank you so much, It is what I need!
Best regards,
--
hapiest