I need to replace content of grid cell after button click. For example: there is Label and I need to replace it with Text. Is it possible with GridLayout? I need to use SWT.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can simply dispose the
Labeland put a newTextin its place.GridLayoutuses the z-order of children to determine the location in the grid, so you’ll need to use themoveAbove()andmoveBelow()on theTextin order to get it in the correct location. Then calllayout()on the parent. For example:Here’s a simple widget that illustrates exactly what I mean: