OpenDCL 5.0.0.17 - Custom "Tray" form template

Started by jb, June 06, 2008, 11:02:08 AM

Previous topic - Next topic

jb

Please take Note:
The following will only work on Alpha 17 and later!!!

The latest Alpha build of OpenDCL includes two new form events: MouseEntered and MouseMovedOff.  Well I've taken these two events and created "expandable" forms - kinda like palettes but more toolbar like - horizontal.  I actually like them better than palettes: mine sit "rolled-up" just under my toolbars and expand when needed, take a look:

Rolled-up



when the mouse moves over; Rolled-down



when the mouse moves off; Rolled-up



Ok, so what I have for you guys today is a container template.  It already has all the code necessary to control the resizing, doc events, and command line entry stuff needed to control the form.  All you have to do is add whatever other controls to the form, and manage their events, as you would with a normal modeless form.  Don't change the names or pictures of the 3 "tray" controls - if you do you'll need to coordinate the lisp to match.

jb000.lsp is machine code that the OpenDCL editor creates to be wrapped in a fas or vlx file.  The method I employ here is best for a fas file (which is what use).

jb000.odcl is the OpenDCL form definition file that gets edited in the OpenDCL editor.

jb000-odclControl.LSP is a standard AutoLISP file where all the support and form control subs are found.  This is where you'll add all the additional controls code that are added to the form in jb000.odcl.

So, basically jb000-odclControl.LSP is already to go.  Drag and drop into AutoCAD and type "test" at the command line.  The form shows initially rolled up.  Move the mouse over and off the form to see it roll up and down.  Use the "Tray" button - the one with the little arrow on it - to "pin" the form down, and then to restore it to mouse event mode.  The little button with the x is to close the form.  Note that a registry entry will be made to save the expanded state of the form so the form will expand the same in all opened documents.

Well, let me know what you think.  I think all the support subs are there - but ya know I might have missed a couple.  :lol:

Code assumes OpenDCL is already loaded - and it doesn't check version info (prolly should)
James Buzbee
Managing Memeber
Black Horse Development, LLC

BazzaCAD

Wow, looks great JB. Thx for the template. Maybe we should add it to the samples folder.
Can you add an animated GIF in this post to show the roll-up & roll-down working?
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

jb

Download it and make sure everything works and then heck yeah - throw it in the samples folder!!

I've never made an animated GIF before  :-[  maybe someone with that nifty movie software can make a short for us???
James Buzbee
Managing Memeber
Black Horse Development, LLC

Fred Tomke

Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

BazzaCAD

a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom