dleuck
12/04/2024, 7:51 AMshowBorders
property. I've attached a screen shot. Note: You will have to see the image at its natural size (i.e. not the preview) to see the lines. Otherwise they are too small to see.
// Create a LazyVerticalGrid for the wells
LazyVerticalGrid(
columns = GridCells.Fixed(plate.columns), // Set the number of columns
modifier = Modifier.fillMaxWidth()
) {
items(plate.rows * plate.columns) { index ->
// Calculate the row and column for the current index
val row = index / plate.columns + 1
val col = index % plate.columns + 1
val well = plate[Plate.numberToRowIdentifier(row), col]
// Optionally show borders between the wells
val wellModifier = Modifier
.aspectRatio(1f) // Ensure each well is square
.then(
if (showGridBorders) Modifier.border(1.dp, Color.Gray)
else Modifier // No border by default
)
wellUI(well = well, modifier = wellModifier)
}
}
romainguy
12/04/2024, 8:13 AMdleuck
12/04/2024, 8:23 AMdleuck
12/04/2024, 8:25 AMMichael Paus
12/04/2024, 8:30 AMdleuck
12/04/2024, 8:55 AMdleuck
12/12/2024, 8:17 AMSkaldebane
12/31/2024, 3:11 PMdleuck
01/04/2025, 9:18 AM