hal9k
Junior Member
Posts: 87
|
Post by hal9k on May 18, 2023 18:18:21 GMT -5
I have several groupboxes in a window. I've noticed that the upper line of the groupbox is a double line. The curious part is that the double line is not consistent. Some boxes have the double line for the entire width and some only go part of the way to the upper right corner (the rest of it is a single line). I'm curious about why it does this. At first, I thought it was just the very wide boxes that had this issue, but I then noticed that I have 4 groupboxes that are exactly the same size. The first three have the double line at the top and the fourth one has it briefly to the left of the groupbox label while everything to the right of the label is a single line.
Again, not a big deal, but it is curious...
|
|
|
Post by Walt Decker on May 18, 2023 18:28:39 GMT -5
That may be a glitch in the LB implementation. Since a group box is in the windows button class it has several button styles properties. LB may not be reading the properties correctly or honoring the properties in all the boxes. For example, if I set the stylebits to BS_CENTER, LB ignores that. Other languages do not.
PS: You do not need group boxes to manage radio buttons. If you set the stylebits of the first radio button to WS.GROUP (HEXDEC("&H00020000"), the first button in the next group to WS.GROUP, etc., the radio buttons will manage themselves.
|
|
hal9k
Junior Member
Posts: 87
|
Post by hal9k on May 19, 2023 7:53:05 GMT -5
No radio buttons involved - just grouping text and combo boxes to show a relationship. Thanks again.
|
|
|
Post by Brandon Parker on May 19, 2023 19:58:58 GMT -5
Can you provide a simple example that demonstrate what you are talking about?
{:0)
Brandon Parker
|
|
hal9k
Junior Member
Posts: 87
|
Post by hal9k on May 20, 2023 10:45:48 GMT -5
The issue is solved. The suggested use of stylebits did the trick.
Here is what I used to display an ampersand and to have the top border of the box displayed as a double line:
STYLEBITS #Plants.GroupLoc, _BS_CENTER, 0, 0, 0 groupbox #Plants.GroupLoc,_ "Location(s) && Qty", 50, 140, 1260, 130
|
|
|
Post by Brandon Parker on May 22, 2023 19:28:12 GMT -5
The issue is solved. The suggested use of stylebits did the trick. Here is what I used to display an ampersand and to have the top border of the box displayed as a double line: STYLEBITS #Plants.GroupLoc, _BS_CENTER, 0, 0, 0 groupbox #Plants.GroupLoc,_ "Location(s) && Qty", 50, 140, 1260, 130 I was looking for something that specifically shows the double-line issue you were describing. The code posted does not produce double lines with/without the Stylebits being active. Do you have any code that reliably shows double lines? I am just looking to see what is going on... {:0) Brandon Parker
|
|
david
New Member
Posts: 6
|
Post by david on May 23, 2023 3:46:38 GMT -5
I have seen this myself. No special code required just standard LB instructions. It has been mentioned years ago on the earlier forum. I could have multiple group boxes on one window, most OK but one would have the double lines. Just a quirk of LB and Windows.
|
|