BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 04-21-2010, 07:27 AM   #1 (permalink)
New Member
Join Date: Apr 2010
Model: 8700
Carrier: o2
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re how to refresh or redraw screen with a key input?

Please Login to Remove!

Hi there again everyone, I'm new here and I'm new to blackberry development. I'm really impressed I got a response for my previous problem which is now solved so thank you all.

For a student project I'm working on, I have a 2D array of ButtonFields, which I am using to create a Sudoku grid. I've got my input working now and I can modify the cells.

What I'd really like to do is then highlight each correctly completed row, column and 3x3 square once they have been filled in. Ive implemented this on the PC using looping to check the row and set the background colour of each custom button in that row once the user has keyed in the last correct number.

However on the blackberry, the row, col or square doesn't change background if for example I fill the first row with 1 - 9 . But if I go back and scroll over each cell the background does in fact change, suggesting the background has been changed but the screen has not been refreshed.

Is there any way of refreshing or redrawing the screen when a user keys a button? I'm really stuck here..

Thank you in advance and I hope I can return the favour soon
Old 04-21-2010, 10:12 AM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

Call field.invalidate()

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.