G grafsoft Well-Known Member Licensed User Longtime User Apr 17, 2014 #1 Hi, I have several buttons, which are set with similar code (see below). But they get different widths, according to the length of the text. I want the widths all the same. How can I do this? Code: Copy Btnclick.Color=Main.btncolor Btnclick.TextColor=Main.btntxtcolor Btnclick.Text="Klick" Btnclick.Left=Panel1.Width + 10dip Btnclick.Top=0%y Btnclick.Width=100%y - Panel1.Width - 20dip
Hi, I have several buttons, which are set with similar code (see below). But they get different widths, according to the length of the text. I want the widths all the same. How can I do this? Code: Copy Btnclick.Color=Main.btncolor Btnclick.TextColor=Main.btntxtcolor Btnclick.Text="Klick" Btnclick.Left=Panel1.Width + 10dip Btnclick.Top=0%y Btnclick.Width=100%y - Panel1.Width - 20dip
klaus Expert Licensed User Longtime User Apr 17, 2014 #2 What kind of Buttons do you use ? For standard buttons if you set a width this one will not change with different text legths !? What exactly are you doing ? Upvote 0
What kind of Buttons do you use ? For standard buttons if you set a width this one will not change with different text legths !? What exactly are you doing ?
J James Chamblin Active Member Licensed User Longtime User Apr 17, 2014 #3 Shouldn't the 100%y in the last line above be 100%x instead? Upvote 0
G grafsoft Well-Known Member Licensed User Longtime User Apr 17, 2014 #4 Yes of course! Stupid me. Now it works. It seems the system sets the width automatically if it gets an impossible valie. Upvote 0
Yes of course! Stupid me. Now it works. It seems the system sets the width automatically if it gets an impossible valie.