Does anyone know of a low level (no frameworks) example of a drag & drop, re-order-able list?

heh I hate frameworks so this is easy as pie for me… this is what I coded for my students during my lectures few years back: http://ulozto.net/x2b7WLwJ/select-drag-drop-zip This is the main engine code (complete project + exe is in that zip above): //————————————————————————— //— Constants: ———————————————————— //————————————————————————— const int _select_max_l=16; const int _select_max_ll=_select_max_l*_select_max_l; const int … Read more

RichTextBox syntax highlighting in real time–Disabling the repaint

It is an oversight in the RichTextBox class. Other controls, like ListBox, support the BeginUpdate and EndUpdate methods to suppress painting. Those methods generate the WM_SETREDRAW message. RTB in fact supports this message, but they forgot to add the methods. Just add them yourself. Project + Add Class, paste the code shown below. Compile and … Read more

Drawing a rectangle that won’t disappear in next paint

Start with this approach – based around a BufferedImage as the painting surface.. import java.awt.*; import java.awt.RenderingHints.Key; import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; public class BasicPaint { /** Reference to the original image. */ private … Read more