//with this in, the mainWindow.groupPopupMenu does not fill in. Remove it and it works fine!
mainWindow.Width = (screen(0).Width - 100)
mainWindow.Height = (screen(0).Height - 100)
I am unable to replicate this on macOS 11.2.1 with Xojo 2020r2.1. It would be helpful to have the additional information and, if possible, isolate the problem to a small example project and share that.
I’m using a Mac Big Sur 11.1.
My version of Xojo is: 2020 R 2.1
The code is in the mainWindow (Open) Event, and I posted it previously.
Nothing fancy. Just have a listbox on the window, fill in the headers, and align them, and then fill in the popupmenu on the window.
That’s it.
Maybe it works for you because you have 11.2.1 OS?
Without seeing it happen, there’s not much else I can do to help.
As an aside, if your code is in mainWindow then you don’t need to reference mainWindow:
// allow column resize
mainWindowListbox.AllowResizableColumns = TRUE
// fill in the listbox headings
mainWindowListbox.HeaderAt (0) = "Group"
mainWindowListbox.HeaderAt (1) = "Name"
mainWindowListbox.HeaderAt (2) = "Start"
mainWindowListbox.HeaderAt (3) = "End"
mainWindowListbox.HeaderAt (4) = "Notes"
mainWindowListbox.HeaderAt (5) = "Time (seconds)"
mainWindowListbox.HeaderAt (6) = "Time (minutes)"
mainWindowListbox.HeaderAt (7) = "Time (Hours)"
mainWindowListbox.HeaderAt (8) = "Tech 1"
mainWindowListbox.HeaderAt (9) = "Cell Number"
mainWindowListbox.HeaderAt (10) = "Office Number"
// center the columns, not left justify
mainWindowListbox.ColumnAlignmentAt (0) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (1) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (2) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (3) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (4) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (5) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (6) = Listbox.Alignments.Center
mainWindowListbox.ColumnAlignmentAt (7) = Listbox.Alignments.Center
//fill in popup
groupPopupMenu.AddRow "Customer"
groupPopupMenu.AddRow "Awaiting e-mail / COR / calls"
groupPopupMenu.AddRow "Internal Work"
groupPopupMenu.AddRow "Work Order"
groupPopupMenu.AddRow "Important Notes"
groupPopupMenu.AddRow "Other"
//with this in, the groupPopupMenu does not fill in. Remove it and it works fine!
Width = (screen(0).Width - 100)
Height = (screen(0).Height - 100)
You can also set the InitialValue of the Listbox so that you don’t need to use HeaderAt to populate the headers at runtime, assuming you know the columns at design-time.
I’m going to try one or two things here… don’t think they will do anything… but if they do I will post.
And yes, I know I can do the headers before. But I am old, and I do things the way I have always done them. For some reason, doing things in code, so I know what I am doing and why tickles my brain the right way.