Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Margin / Spacing of buttons
Margin / Spacing of buttons [message #15826] Fri, 09 May 2008 00:27 Go to next message
galious is currently offline  galious
Messages: 28
Registered: March 2008
Promising Member
Hi,

While creating an aggregated control I noticed there is some automatic spacing between buttons/controls.

E.G.

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	TopWindow  win;
	Button b[5];
	
	for (int i = 0; i < 5; ++i) {
		b[i].SetLabel(Format("Test: %d", i));
		win << b[i].TopPosZ(i * b[i].GetStdSize().cy, b[i].GetStdSize().cy).LeftPosZ(0, 120);
	}
	
	win.Run();
}


You'll see some spacing between the buttons. Is there any way to remove these? (Except from subtracting e.g 3 pixels, since this may change between OS'ses or versions).

Regards,

Martin Schut
Re: Margin / Spacing of buttons [message #15829 is a reply to message #15826] Fri, 09 May 2008 11:03 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
There is no actual space between the controls. They align up fine. It is the skin provided by the OS to draw the Buttons that has a 1 pixel empty border around them. I don't know if the appearance of this border can be circumvented with the skinning API. I'll have to look into this. Meanwhile, you could use a custom skin or ChStdSkin/ChClassicSkin (which don't have that border) for buttons if you are under time pressure.
Re: Margin / Spacing of buttons [message #15830 is a reply to message #15826] Fri, 09 May 2008 11:10 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
You may also want to look at MultiButton. Only problem is that it only does icon buttons (not text labels). And of course there is no documentation Smile

[Updated on: Fri, 09 May 2008 11:10]

Report message to a moderator

Re: Margin / Spacing of buttons [message #15834 is a reply to message #15826] Fri, 09 May 2008 22:47 Go to previous message
galious is currently offline  galious
Messages: 28
Registered: March 2008
Promising Member
Thanks for your answers. You're both completely right it's removed by setting the standard skin. So it's probably only an issue with Vista.

Using the multibutton I don't see as solution (I want some text in them), and since I'm not in a hurry I'll just code around it.

Regards,

Martin
Previous Topic: Ctrl::GlobalBackPaintHint() and GLCtrl
Next Topic: DocEdit without end line
Goto Forum:
  


Current Time: Thu Apr 18 18:06:13 CEST 2024

Total time taken to generate the page: 0.01600 seconds