It would seem that Xojo is moving to a new framework. The new SQLiteDatabase framework seems to have fewer properties and methods. Is this how it will be for the desktop, too? I like that the existing framework has ErrorCode and ErrorMessage properties, for example. Will these go away in the long run?
Resizing controls. The app’s window will need a couple of list boxes, an HTML Viewer, a toolbar, and a couple of text areas. I’d like these to fill the window area, but be resizable - have grab handles that allow the user to make (say) the HTML viewer bigger at the expense of (say) a list box. I’ve not come across anything yet that indicates this might be possible. Have I overlooked something?
Michele, I think a splitter is all he needs, no? ListBox on the left and the HTMLViewer on the right and splitter in the middle. The Einhugur Windowsplitter needs about 3 lines of code to handle resizing as he described.
I’ve got one app with 5 controls horizontally laid out with 4 splitters in between. Each splitter controls the size of the controls one each side of it. Now if he wanted to proportionally resize the rest, he would just refigure the percentages and set the other 4 programmatically.
What he wants to obtain would be extremely simple with iOS or RubberViewsWE Auto Layout, where you set the distance at which a control can be to another, and can make its size relative as well.
In Desktop, that does not exist (yet). So having controls resize relative to each other requires coding that relationship. It is not extremely difficult, but it gets more complex as the number of controls grow. There another important question, he wants to have a handle on a control to resize it. And that requires yet another piece of code to make it work.
Hence my suggestion to have an idea of what he plans to do before actually posting any code.
The HTMLViewer on the left can be resized by clicking and dragging the small rectangle at the bottom corner (the handle). As you resize the HTMLViewer, the Listbox on the right grows and shrinks accordingly.
The principle is that when the click occurs, the X and Y position within the rectangle are recorded in the Window properties Rx and Ry.
In HTMLViewer Open the property distance records the distance between the two controls. In ListBox Open ListBoxRight is set as well, to know where it stops on the right.
Everything happens in the Rectangle MouseDrag event. As the mouse is dragged, the program makes sure the position of the mouse remains constant relative to Rx and Ry by moving the rectangle accordingly. Then the right and bottom of the HTMLViewer are set relative to the rectangle, and finally, the left and width of the Listbox are set relative to the HTMLViewer right side.
As your program emulates the Eudora interface, maybe you want the same kind of thing vertically, but the principle remains.
I know that email clients are somewhat old hat, but it’s fun anyway.