redraw

Layer-backed OpenGLView redraws only if window is resized

≡放荡痞女 提交于 2019-12-02 21:06:50
I have a window with a main view of type NSView and a subview which is a subclass of NSOpenGLView whose name is CustomOpenGLView . The subclass of NSOpenGLView is obtained through a Custom View in Interface Builder and by setting its class to CustomOpenGLView . This is made according to the Apple Sample Code Layer Backed OpenGLView . The app is made to draw something to the OpenGLContext every, let's say, 0.05 seconds. With Core Animation Layer disabled I am able to see the moving object in the view, which is the consequence of the continuous redrawing of the view. And everything works

Invalidate is not redrawing the screen. Android

我的梦境 提交于 2019-12-02 01:25:23
BufferedReader hl = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.lines))); while(hl.ready()){ showLines.append(hl.readLine()+"\n"); showLines.invalidate(); Thread.sleep(10); } That is my code but it is not redrawing when I tell it to. It is supposed to redraw after every line that is added to textview, but it still only redraws at the end? Can someone please help me, I can't figure it out. That is bacause your invalidate() is in a thread while loop and is being acummulated, so to speak, until the loop ends, and only than it draws... I had the same problem when

Speeding up WPF resizing/redrawing

给你一囗甜甜゛ 提交于 2019-12-02 00:59:12
Im noticing a black area displays when resizing even an empty WPF window. Alot of programs on my desktop dont have these issues.. So im wondering, is there a way to set a resize redraw priority or something, and speed up the resizing of WPF windows? or is this problem just unavoidable. This is inherit to how WPF works and there is nothing you can do about this. What you're seeing is the DirectX surface resizing and the entire surface redrawing, which takes a considerable amount of time. 来源: https://stackoverflow.com/questions/4110698/speeding-up-wpf-resizing-redrawing

Canvas redraws only after loop ends

偶尔善良 提交于 2019-12-01 06:37:00
I have an issue with drawing on canvas in a loop. What I want to achieve is that in each loop the script waits for a few milliseconds, then draws on a canvas, the user can actually see the change, and then the loop repeats. What it does instead is that the user can't see the change, until the for-loop ends. But I have found that if I show an alert window and the script waits for the user to respond, it actually draws the change. How to show "the small changes" in every loop, not just in the end? My code ( also here: http://janiczek.github.com/heighway-dragon/ the link now contains something

How to force a view to redraw immediately before the next line of code is executed

陌路散爱 提交于 2019-12-01 02:46:25
I have a LinearLayout that I would like to change the background color of when one of its child views (an ImageButton) is clicked. I am able to do this, but not immediately - the change doesn't occur on the screen until later (I think during an onResume call). I would like to find out how to force the layout to redraw after the background is set, before the next line of code executes. Here is the onClick method of my OnClickListener for the button: public void onClick(View v) { LinearLayout parentLayout = (LinearLayout) v.getParent(); parentLayout.setBackgroundResource(R.color.my_color);

UITableView scrolling and redraw issue

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 01:47:19
I know that if I have some images and subviews added in customized cell then I have to reuse the cell so that custom control won't appear on other cells but here I have other issue. I just want to have ImageView on first cell of first section so I have used IndexPath.Section==0 and IndexPath.Row==0 condition in following code but the problem is when I scroll table, the other cell will meet this condition and my code will create imageview on that cell as well. I have tried Tagging it and using same tagged cellView but it didn't help either. The cell issue is with disabling user interactions for

UITableView scrolling and redraw issue

此生再无相见时 提交于 2019-11-30 21:14:01
问题 I know that if I have some images and subviews added in customized cell then I have to reuse the cell so that custom control won't appear on other cells but here I have other issue. I just want to have ImageView on first cell of first section so I have used IndexPath.Section==0 and IndexPath.Row==0 condition in following code but the problem is when I scroll table, the other cell will meet this condition and my code will create imageview on that cell as well. I have tried Tagging it and using

Forcing Flex to update the screen?

孤街醉人 提交于 2019-11-30 19:36:17
This may be a bit of a beginners question, but I can't for the life of me figure it out. I'm using flex to develop a GUI for a large project, specifically a status bar along the bottom. Within my StatusBar class is a ProgressBar, which other classes doing work can tell to update(change bar completion and label) as they progress. The problem I'm encountering is that flex won't update whats shown on the screen until it's too late, for example ProgressBar initialized, 0% done some class sets the ProgressBar to be 12% done some class does some work some class sets the ProgressBar to be 56% done

WPF forcing redraw of canvas

坚强是说给别人听的谎言 提交于 2019-11-30 09:11:43
Okay, in windows forms you can use .refresh() to cause a redraw event on an element. Is there a similar solution in WPF? An explanation of what I'm doing, I'm drawing a maze on a canvas object, and would like to watch as the maze is drawn (so I can see progress) instead of waiting 28 min for a solution to suddenly appear. I am drawing blocks on the canvas with a series of Rectangle s. Should the refresh be on the rectangle or the canvas? Here is a recent output: http://imgur.com/ftFOv I'd like a solution in c# if that is possible. Thanks. You probably want to use the Dispatcher object. I

Forcing Flex to update the screen?

橙三吉。 提交于 2019-11-30 03:35:01
问题 This may be a bit of a beginners question, but I can't for the life of me figure it out. I'm using flex to develop a GUI for a large project, specifically a status bar along the bottom. Within my StatusBar class is a ProgressBar, which other classes doing work can tell to update(change bar completion and label) as they progress. The problem I'm encountering is that flex won't update whats shown on the screen until it's too late, for example ProgressBar initialized, 0% done some class sets the