我使用按钮在javafx中制作随机图库。我正在将imageView设置为按钮,因为我需要点击图像。问题是imageView未按预期设置按钮。按钮的高度和宽度均为110.
以下是用于为按钮设置imageView的代码。
for(int i=0; i<35; i++){
Button button = list.get(i);
ImageView imageview =new ImageView(imageList.get(i));
imageview.setPreserveRatio(true);
imageview.setFitHeight(110);
imageview.setFitWidth(110);
button.setGraphic(imageview);
}
答案 0 :(得分:1)
您需要将booknode* tempNext;
booknode* tempPrevious;
tempNext = head->next;
tempPrevious = head->previous;
delete head;
tempNext->previous = tempPrevious;
temoPrevious->next = tempNext;
head = tempNext;
的{{3}}更改为空:
Button