repaint

Speeding Up Slow, CPU-Intensive Scrolling in WinForms

How can I speed up the scrolling of UserControls in a WinForms app.? My main form has trouble scrolling quickly on slow machines--painting for each of the small scroll increments is CPU intensive. My form has roughly fifty UserControls (with multiple fields) positioned one below the other. I’ve tried intercepting OnScroll and UserPa...

How to stop a MFC/win32 control re-painting

I have a CRichEditCtrl, and an algorithm works on its contents in-place, iterating through the contents and making changes. This seems to cause it to re-paaint every time, which causes flickering and a noticeable time to complete the operation, especially if the control starts scrolling. I wondered if there's a neat way for me to stop it...

In C#, how do you send a refresh/repaint message to a WPF grid or canvas?

How do you send a refresh message to a WPF grid or canvas? In other words, I have noticed while in debug mode, I can write code that sends a line to the display and then, if that line is not right, I can adjust it -- but the previous line is still there. Now, the code I am writing sends information to the display based on what the user ...

Java Applet Buffering images

OK so here's my code: http://www.so.pastebin.com/Qca4ERmy I am trying to use buffers so the applet won't flicker upon redraw() but it seems I am having trouble. The applet still flickers.... Help? Thank you. I made a quick video about this problem: http://www.vimeo.com/12035196 ...

Resizing JPopupMenu and avoiding a "flicker" issue

Hi, I am trying to implement a search results popup list similar to the style found here: http://www.inquisitorx.com/ (I'm not trying to implement a Google search, I'm just using this as a rough example of the style I'm working on.) In any event, I am implementing this by using a JList contained within a JPopupMenu which is popped up...

QGraphicsItem repaint

I want to change text color inside a rectangle periyodically Here is my trial: TrainIdBox::TrainIdBox() { boxRect = QRectF(0,0,40,15); testPen = QPen(Qt:red); i=0; startTimer(500); } QRectF TrainIdBox::boundingRect() const { return boxRect; } void TrainIdBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt...

repaint problem

I have a problem with my repaint in the method move. I dont know what to doo, the code is below import java.awt.*; import java.io.*; import java.text.*; import java.util.*; import javax.sound.sampled.*; import javax.swing.*; import javax.swing.Timer; import java.awt.event.*; import java.lang.*; public class bbb extends JPanel { ...

c++ repaint window

i got a window with an image in it. but when its a little picture i first need to resize the window before i can see it, the screen doesnt refresh/repaint. how can i fix this? ...

Stop JButton repainting on mouse over?

I have created a custom JButton class for representing spaces on a monopoly board. The game is multiplayer so a lot of the information needed to draw the button is held on the server (accessed via RMI). My problem is that when I mouse over the button it automatically seems to call repaint() (and draws a border). This makes the program ...

The gridBagLayout and the JscrollPanel

Cross Post: http://www.javaworld.com/community/node/4746 http://forums.sun.com/thread.jspa?messageID=11025554 1. GridBagLayout When I tried to use the GridBagLayout, I found that I can not change the weight of each component added in the container. For example,In the contentPanel of the JDialog, I added two sub panels: leftPanel and ...

Delphi 6 : breakpoint triggered on non-VCL thread stops main thread repaints

I have a multi-threaded Delphi 6 Pro application that I am currently working on heavily. If I set a breakpoint on any code that runs in the context of the Main thread (VCL thread) I don't have any problems. However, if a breakpoint is triggered on any code in one of my other threads, after I continue the application from the breakpoint...

How to update a label to make it display new text?

I am making an application in netbeans and want to have a status label that tells what is going on in the program at any given moment. There is a ton of code, but here is pretty much what it does: Just pretend that statusLabel is a label that has already been put in the program and each of the functions is an expensive function that take...

c++ gdi animation not working

im trying to create ball animation using gdi but i can't get it working. i created a ball using this Graphics graphics(hdc); Pen pen(Color(255, 0, 0, 255)); graphics.DrawEllipse(&pen, sf , 0, 10, 10); i have while loop that loops and adds 1 to sf value basicly like this sf++; than i try to repaint the window(it doesn't work...

repaint() not called when running app from Eclipse?

I never get "paint" written to my command line window when I use Eclipse and Run->cmd to run the program. It works fine if I run System.out.print() from paintComponent in another program. Someone who can help? import java.awt.*; import java.awt.event.*; import javax.swing.*; public class GUI extends JPanel implements KeyListener, Actio...

jQuery: reducing repaints

Hi I need to optimize an image gallery slider since a lot of browsers have a hard time dealing with the animations. Please consider the following example: var $div1 = $('#div1'), $div2 = $('#div2'), $div3 = $('#div3'), left = 0; function animate() { left -= 10; $div1.css({ left: left + 'px', width: 1000 - left + 'px' })...

How to repaint a UITextView for iPhone 3.x after updating data programatically

In my app I update a textView progamatically. I actually loop through a dataset from a SQLITE3 DB and show a specific text for a given time. Then I would like to show the text from the next dataset record and so forth. I have been browsing through all kind of forums and the apple doc as well, but could not find anything like a repaint, r...

JScrollPane always clears my Panel

Hy.. I have a JPanel, and in this contentPanel I added some other custom panels and give them locations etc. So now I added a JScrollPane to the contentPanel and always when I scroll down it clears my contentPanel, but the panels are still there but not visible... How can I make them visible again? That's my code to add the Panel into ...

Delphi 6 - Bitmap only updates when owner window requires a repaint when using the Graphics32 library

I have an application that creates 3D motion on a TPaintBox Canvas using native Delphi code. In the old code I rendered the 3D image to a temporary TBitmap on a Timer event. In the TPaintBox OnPaint() event I would BitBlt() the temporary TBitmap the TPaintBox's Canvas. This approach worked fine but the motion was jerky. Because I was...

Why does a partially hidden JFrame not repaint properly on Linux when switching between virtual desktops

Hi, we have problems with Java 6 applications that do not properly refresh when switching virtual desktops. The problem so far has been reproduced on Fedora 11 and 13 with GNOME and Suse SLES 10 with KDE. I use the following test case to reproduce the problem: import java.awt.Color; import java.awt.EventQueue; import java.awt.event.Acti...

Java Repaint on MouseMoved causes lag

Hi, I'm trying to make my java app repaint each time the mouse has been moved to update the screen when the user moved over a diagram ( -> display the name of the diagram ) and when the user does not move over a diagram ( -> do not display any name of a diagram ). But this causes a huge lag when running the application ( I see the scree...