OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: owenwengerd on December 06, 2009, 10:42:23 PM

Title: OpenDCL 6 Display Issues
Post by: owenwengerd on December 06, 2009, 10:42:23 PM
There are still numerous display issues being reported in OpenDCL 6 since my attempt to refactor the control painting code by removing redundant and inefficient operations.  Since I cannot reproduce many of the display problems on my system, I'm having trouble fixing them.  Worst of all, fixing a problem by trial and error often leads to new problems that I can't see on my development system.

I need a different plan of attack.  Ideally, I'd like to be able to reproduce the problems under the debugger.  If I could create or configure a virtual machine identical to one of your problem computers, I might be able to reproduce the display problems in the virtual machine.  To help me do that, I'd like to gather some information from those of you experiencing display problems in the Alpha 15 build.

If you are experiencing display problems such as controls not getting painted properly until you pass the mouse over them, or controls on tab pages not displaying, etc., please reply here with exact system details, including graphics card.  My development system is running Windows 7 x64, so if you are able to reproduce the display problems on a Windows 7 system, I'd certainly like to compare notes.

At this point I'm not sure what else to try.  I will skip an Alpha 16 release this week to see if I can get a better handle on these problems.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 06, 2009, 11:24:10 PM
My System Information file,

MSINFO32 at DOS command
OR
Start->AllPrograms->Accessories->SystemTools->System Information ... save and Zip.


added;
@home
Dual monitors - SAMSUNG SyncMaster 2494HS.
Win XP Theme.

@work
Dual monitors - DELL 24. 
Win XP Theme.
Title: Re: OpenDCL 6 Display Issues
Post by: Danner on December 07, 2009, 01:10:11 AM
My problematic computer is Vista, not Windows 7.  Here's the system info anyway.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 09, 2009, 02:14:56 AM

Anyone else having display problems with 6.0.0.10 -> 6.0.0.15 ??


Title: Re: OpenDCL 6 Display Issues
Post by: andrew on December 09, 2009, 12:07:15 PM
here is my system info however im not having any display issues
with odcl, im using build 6.0.0.15


OS Microsoft Windows 7 Professional x64
Intel(R) Xeon(R) Quad Core CPU W3520 @ 2.67GHz, 2661 Mhz
6.00 GB of Ram
Video Card ATI FirePro V3700
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 09, 2009, 12:18:46 PM
So far the only thing in common is that all problematic systems are 32-bit, but that may just be coincidence. What about multiple monitors or specialized themes?  Neither here.
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 09, 2009, 12:58:15 PM
Sorry I've been out of the loop a little on this one. Which sample should I use to test these display issues?
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 09, 2009, 01:02:58 PM
Barry, that's another thing, some issues have already been fixed, so I'm also not completely certain which ones remain (and which are new). The most recent problem is that controls inside frames on tab pages don't display.
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 09, 2009, 02:22:07 PM
I'm having the same "controls inside frames on tab pages don't display" issue here at work. Actually controls outside of frames on tab pages don't display either (until you mouse over them)
I'm on Win. XP Sp3 32-bit, dual LCD's, default Win. XP Theme.

I'll check at home on my Vista x64 bit when I get there..

Here's my NFO, says it has an error when you open it, but all the info seems to be there...
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 09, 2009, 02:32:39 PM

added ti info post;
@home
Dual monitors - SAMSUNG SyncMaster 2494HS.
Win XP Theme.

@work
Dual monitors - DELL 24. 
Win XP Theme.

My major issue is with these controls onto tab pages
TextButton
TextBox
SlideView
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 09, 2009, 02:37:51 PM
Let's see if we can norrow things down.  Is anybody still (as of Alpha 15) having problems with controls that are not on a tab page?
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 09, 2009, 02:45:05 PM

All my known current issues are with controls on a Tab page.
Visual style does not affect the issue.


Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 09, 2009, 04:03:13 PM

Just for info.

I did have an issue with the CheckBox NOT displaying on a Rectangle Control untill MouseOver.
This was resolved by changing the Background Color of the CheckBox to -16(buttonFace)
and leaving the rectangle  Background Color as -24(transparent)
and leaving the Form Background Color as -24(transparent) 

Regards,
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 09, 2009, 10:26:20 PM
Quote from: owenwengerd on December 09, 2009, 02:37:51 PM
Let's see if we can norrow things down.  Is anybody still (as of Alpha 15) having problems with controls that are not on a tab page?

@ Home on Vista x64 (dual screen) Acad2010, I still have the issues on the tab page.
Controls that aren't on the tab page, but on the same form, show fine....
Title: Re: OpenDCL 6 Display Issues
Post by: Danner on December 10, 2009, 01:02:59 AM
Quote from: Kerry Brown on December 09, 2009, 02:45:05 PM
All my known current issues are with controls on a Tab page.
Visual style does not affect the issue.
Same for me
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 10, 2009, 01:06:15 AM
Kerry: can you sent me the last sample to test? I've tried your sample files from your initial posting and I've no problem on my notebook with 6.0.0.15. But I do have graphical issues with one of mine with 6.0.0.15 but not with 5.1.2.3. But I cannot publish it - then I have to upload the whole product...

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: copter on December 10, 2009, 01:27:06 AM
Owen,
Just an idea: Because display issues occurred since alpha 10, is it not possible to compare what was changed between alpha 9 and 10. ?
copter
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 10, 2009, 01:45:31 AM
Quote from: Fred Tomke on December 10, 2009, 01:06:15 AM
Kerry: can you sent me the last sample to test? I've tried your sample files from your initial posting and I've no problem on my notebook with 6.0.0.15. But I do have graphical issues with one of mine with 6.0.0.15 but not with 5.1.2.3. But I cannot publish it - then I have to upload the whole product...

Fred

Here is my last test, for all to try.
There are controls on Tabs 2 and 3 also that cause issues.
Kerry.


Attached Code and piccys for members.:
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 10, 2009, 02:17:35 AM
Hi, I cannot see anything wrong, do you?

I tried on two machines (see attachments).

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 10, 2009, 02:28:14 AM

Looks fine to me Fred.
Single Monitor or Dual ?

Interesting that the slideView and DwgPreview have a gray background .. is that your modelspace color ?

Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 10, 2009, 03:04:29 AM
Hi, Kerry,
Quote from: Kerry Brown on December 10, 2009, 02:28:14 AM
Single Monitor or Dual ?

The 32 Bit workstation has two Samsung 2343BW in dual mode (extend the main screen to the second screen).  The 64 Bit machine is a single notebook - but wait: I will try to apply a monitor to the notebook ... Now I connected one of the Samsung 2343BW with the 64 Bit notebook. The form works on the second screen in duplication mode as well as in the mode extending the main screen to the second screen.

I hope that helps.

Quote from: Kerry Brown on December 10, 2009, 02:28:14 AM
Interesting that the slideView and DwgPreview have a gray background .. is that your modelspace color ?

No, it's the modelspace backcolor Autodesk like to have in AutoCAD Map :( . They change the modelspace back color with every new AutoCAD release like I change my underwear (as the German as the proverb has it: to change something as often as someone's underwear).

Map 2006: blue (qoute from Autodesk: The backcolor of CAD is black and the backcolor of GIS is blue).
In Civil 3D 2009 the back color is a very light mixture of yellow and orange. And now Map 2010 is grey in the back. Believe it or not: it was mentioned as one of the benefits of the new release of R 18.1:  the back color was turned to dark grey. I love it! (Am I too sarcastic?)

I had to reinstall AutoCAD Map between two cutomer trainings and I forgot to change to WHITE: the color most landscape architects usually use to persuade themselves of a piece of paper.

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: andrew on December 10, 2009, 06:12:22 AM
Quote from: owenwengerd on December 09, 2009, 12:18:46 PM
So far the only thing in common is that all problematic systems are 32-bit, but that may just be coincidence. What about multiple monitors or specialized themes?  Neither here.

if by graphical display errors you mean something like this
then i get them but only when i used the combo box.
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 10, 2009, 08:17:26 AM
Andrew, the other reported problems are all inside AutoCAD at runtime, but it's interesting that the combo box displays wrong for you in Studio.
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 10, 2009, 08:20:02 AM
Quote from: copter on December 10, 2009, 01:27:06 AM
Just an idea: Because display issues occurred since alpha 10, is it not possible to compare what was changed between alpha 9 and 10. ?

In Alpha 10 I completely removed all the hacks, workarounds, and kludges added previously to fix display problems. So yes, I could go back, but then I'd be right back where I started: with an unmanageable mess!
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 10, 2009, 10:50:30 AM
It looks like the main display issues that are still outstanding for a15 are TextButtons, CboBoxes, & textBox (background color), grids, ListBox on Tab Pages...
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 10, 2009, 10:57:44 AM
Barry, your screenshots look completely different to mine (see above). Curious!
Fred
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 10, 2009, 11:25:51 AM
Fred,

Barry's look exactly like mine (not as expected)  .. on 2 machines on winXP

... yet I have several machines on winXP that look like yours. ( ie as expected)

Title: Re: OpenDCL 6 Display Issues
Post by: copter on December 10, 2009, 01:33:20 PM
Same issue for me with Acad2009, 2010, Bricscad 10 under VISTA.
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 13, 2009, 10:19:14 AM
I've been unable to reproduce the tab page issues, no matter what I've tried. So, we're back to trial and error. Thanks to all the input, I think I've at least narrowed things down a bit, so I'm more opimistic that trial and error will be successful. In Alpha 16, I've made another slight change to the way tab pages are painted, so please test it and report back your results.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 14, 2009, 12:01:00 AM
WHEEEEEEEEEEEEEEEEEEEEEEEEEE !!!!!!

Thanks Owen.

result 6.0.0.16 as attached :
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 14, 2009, 01:04:51 AM
Kewl!! Let's see whether any new problems crop up...
Title: Re: OpenDCL 6 Display Issues
Post by: Danner on December 14, 2009, 01:30:22 AM
..and it works for me too. Fabulous!!
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 14, 2009, 12:18:02 PM
Looking good on my end also... :)
Nice work Owen.
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 14, 2009, 01:55:17 PM
Great! Have any of you noticed any problems with overlapping controls in Alpha 17? Problems with transparent controls?
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 14, 2009, 02:20:47 PM
I noticed a very small issue with the "Tree" sample.
Some labels with transparent backgrounds where slightly overlapping the tops of the ComboBoxes.
It could be fixed by make them not overlap, but I'm sure you're more interested in how they look when they do overlay...

Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 14, 2009, 02:57:18 PM
Can you post a screen cap?
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 14, 2009, 03:45:01 PM
Here ya go...
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 14, 2009, 04:24:00 PM
Ah, I see.  This display behavior of transparent controls is by design now, so that dialog will need to be fixed to ensure there is no overlap.
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 14, 2009, 10:42:53 PM
Quote from: owenwengerd on December 14, 2009, 01:55:17 PM
Great! Have any of you noticed any problems with overlapping controls in Alpha 17? Problems with transparent controls?

Boooah! Where can I find Alpha 17?  ;)

Actually I have found a very small detail with splitters. You can see it in the video or test in the Splitter sample (German only).

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 15, 2009, 07:58:13 AM
Hello, I have another one:

have a look at this sample (http://www.opendcl.com/forum/index.php?topic=1082.msg5719#msg5719). The loaded dwgpreview are only getting visible after moving the form outside the windows first.

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: BazzaCAD on December 15, 2009, 10:22:41 AM
Quote from: Fred Tomke on December 15, 2009, 07:58:13 AM
Hello, I have another one:

have a look at this sample (http://www.opendcl.com/forum/index.php?topic=1082.msg5719#msg5719). The loaded dwgpreview are only getting visible after moving the form outside the windows first.

Fred

That looks fine, just tell your users to always drag the form off screen before they start using it.



Haha, I'm joking.. ;D
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 15, 2009, 03:34:47 PM
Hi, now I got completely confused. I ask you to compare the congrats form from the eventhandling sample of the OpenDCL samples folder at designtime and at runtime.
I got two completely different result. Does it match to yours?

Fred

[EDIT]: I don't mean the language :)
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 15, 2009, 03:45:49 PM
Same here, Fred. I'll investigate.
Title: Re: OpenDCL 6 Display Issues
Post by: copter on December 17, 2009, 05:18:16 AM
A new display issue since alpha 16:

Controls inside a rectangle are sometimes not displayed but I am not understanding why.
And the tab order is not the only soluce in this case.
(See sample attached)

Copter
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 17, 2009, 05:45:10 AM
Quote from: copter on December 17, 2009, 05:18:16 AM
And the tab order is not the only soluce in this case.

Hi, copter, I've tested it. Move it out of the window for a short while. Then the captions are visible.  ;)

No, have a try with the project file I've attached. It works for me.

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: copter on December 17, 2009, 07:20:07 AM
Hi Fred
I moved it . Funny.
But I tried your project. Doesnt not work for me (Vista+R2009)
What did you changed exactly ?

Copter
Title: Re: OpenDCL 6 Display Issues
Post by: Fred Tomke on December 17, 2009, 07:42:19 AM
QuoteDoesnt not work for me (Vista+R2009)

Did not? Hm, have you (re)loaded the right project?

QuoteWhat did you changed exactly ?

First thing I do whenever I get display errors is to set the background of all rectangles, optionbuttons, checkboxes and captions to -16. So I did this time and it worked perfectly for me.
(XP 32 Bit C3DR2009)

Fred
Title: Re: OpenDCL 6 Display Issues
Post by: copter on December 17, 2009, 10:48:08 AM
I confirm. I downloaded the right one with background = -16.
Same issue.
And, If I move the form outside the screen, the X and Y labels are black , not red.

Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 17, 2009, 12:59:53 PM

on my XP 32bit

Fred's Test16-1.odcl from #PostReply 44 displays as I'd expect

Copter's Test16-1.odcl from #PostReply 43 displays initially without the Label Caption and without the top row of  CheckBox controls.

The checkbox controls display after a mouseOver
or both LabelCaptions and CheckBoxs show after dragging offscreen and returning .... but with the LabelCaption Color as Black.


I recall demonstration (on Owen's advice) in one of my posts that changing the BackGroundColor to ButtonFace(-16) for the Rectangle and the OptionBox controls fixed the display issue.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 18, 2009, 03:56:27 PM

Owen, thanks for your endevours particularly with this 6.xx change issue.
Can you see any advantages in performance ( we know about the changes to old code)

Kerry.

Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 18, 2009, 04:38:13 PM
I can't say that I've noticed much change in performance, but the code is a heck of a lot simpler and easier to maintain now.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 27, 2009, 11:43:39 PM
Quote from: Fred Tomke on December 15, 2009, 07:58:13 AM
Hello, I have another one:

have a look at this sample (http://www.opendcl.com/forum/index.php?topic=1082.msg5719#msg5719). The loaded dwgpreview are only getting visible after moving the form outside the windows first.

Fred

For Build [6.0.0.17]
I assume this has not yet been addressed.
I have a similar situation.

Modal dialog, Simple layout (no frames, Rectangles, tabs ....
This code loads the DwgPreview control with a drawing selected from a listbox.
Code (autolisp) Select

;;;---------------------------------------------------------------------------
;;;---------------------------------------------------------------------------
;;;
(defun c:KDUB_BlockInserter_Main_ListBox_OnSelChanged (ItemIndex Value /)
 (dcl_dwgpreview_loaddwg KDUB_BlockInserter_Main_DwgPreview1
                         (strcat G1003-SelectedFolder "\\" Value)
 )
)
;;;---------------------------------------------------------------------------
;;;---------------------------------------------------------------------------
;;;


The DwgPreview control does not display untill either
a) the control is selected.
or b) the form is dragged offscreen and back on.

I'll put together a tester if you want.

This is with WinXP x32
I don't have the new win7 x64 box loaded yet

Regards
Kerry
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 27, 2009, 11:55:11 PM
As a work-around, I'm forcing a redraw of the control
Code (autolisp) Select

;;;---------------------------------------------------------------------------
;;;---------------------------------------------------------------------------
;;;
(defun c:KDUB_BlockInserter_Main_ListBox_OnSelChanged (ItemIndex Value /)
  (dcl_dwgpreview_loaddwg KDUB_BlockInserter_Main_DwgPreview1
                          (strcat G1003-SelectedFolder "\\" Value)
  )
  (dcl_Control_Redraw KDUB_BlockInserter_Main_DwgPreview1) ;; <-- redraw added for workaround : kdub 20091228
)
;;;---------------------------------------------------------------------------
;;;---------------------------------------------------------------------------
;;;
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 28, 2009, 06:51:03 AM
I would like to see a sample modeless form with only one dwgpreview control that exhibits the problem. I still have some cases where the control painting fails, but I haven't been able to pin down the cause. I'm suspicious that something triggers an infinite painting loop that Windows detects and cancels, but in my tests the problem seems to disappear when the form is simplified.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 28, 2009, 07:04:41 PM
Demo/Sample

Code (autolisp) Select

;;K60017h.lsp
;;K60017h.odcl
;|
KWBrown 20091229
for OpenDCL 6.0.0.17 testing
to demonstrate painting of DwgPreview control
|;
;; Initial folder for DirectoryPicker

(setq g:K60017h_RootFolder "J:\\Blocks")


(defun c:DOIT (/) (c:K60017h))

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h (/)
 ;; Codehimbelonga kdub@opendcl.com
 (vl-load-com)
 (command "._OPENDCL")
 (dcl_project_load "K60017h.odcl" t)
 (if (not (dcl_form_isactive K60017h_F))
   (dcl_form_show K60017h_F)
 )
 (princ)
)
(princ "\n K60017h to run.")
(princ)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_OnInitialize (/ ParentID Folders)
 (dcl_control_settext K60017h_F_RootFolder g:K60017h_RootFolder)
 ;;
 (setq ParentID (dcl_tree_addparent K60017h_F_Tree g:K60017h_RootFolder 0 -1 1))
 (if (= ".." (cadr (setq Folders (vl-directory-files g:K60017h_RootFolder NIL -1))))
   (setq Folders (cddr Folders))
 )
 ;;
 (foreach folder Folders
   (dcl_tree_addchild
     K60017h_F_Tree
     (list (list ParentID folder (strcat g:K60017h_RootFolder "\\" folder) 2 3))
   )
 )
 (dcl_tree_expanditem K60017h_F_Tree ParentID 1)
 ;;
 (dcl_tree_selectitem K60017h_F_Tree
                      (dcl_tree_getfirstchilditem K60017h_F_Tree ParentID)
 )
)
;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_Tree_OnSelChanged (Label Key / SubFiles SubFolders subList)
 ;;
 ;| Description:



 |;
 (dcl_listbox_clear K60017h_F_ListBox)
 ;;
 ;;(or (= (type Key) 'str) (setq Key g:K60017h_RootFolder))
 (if (= (type Key) 'str)
   (progn
     (setq g:SelectedFolder key
           SubFiles         (vl-directory-files g:SelectedFolder "*.DWG" 1)
     )
     (if (= ".." (cadr (setq SubFolders (vl-directory-files g:SelectedFolder NIL -1))))
       (setq SubFolders (cddr SubFolders))
     )
   )
 )
 ;;
 (if SubFolders
   (progn (setq subList '())
          (foreach folder SubFolders
            (setq subList (cons (list g:SelectedFolder
                                      folder
                                      (strcat g:SelectedFolder "\\" folder)
                                      2
                                      3
                                )
                                subList
                          )
            )
          )
          (dcl_tree_addchild K60017h_F_Tree (reverse subList))
   )
 )
 ;;
 (if subFiles
   (progn (setq subList '())
          (foreach file subFiles (setq subList (cons file subList)))
          (dcl_listbox_clear K60017h_F_ListBox)
          (dcl_listbox_addlist K60017h_F_ListBox (reverse subList))
          ;;
          (dcl_listbox_setcursel K60017h_F_ListBox 0)
          (dcl_dwgpreview_loaddwg
            K60017h_F_DwgPreview
            (strcat g:SelectedFolder "\\" (dcl_listbox_getitemtext K60017h_F_ListBox 0))
          )
          ;; (dcl_Control_Redraw K60017h_F_DwgPreview) ;; <-- redraw added for workaround : kdub 20091228  
     )
 )
)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_ListBox_OnSelChanged (ItemIndexOrCount Value /)
 (dcl_dwgpreview_loaddwg K60017h_F_DwgPreview (strcat g:SelectedFolder "\\" Value))
 ;;
 ;; (dcl_Control_Redraw K60017h_F_DwgPreview) ;; <-- redraw added for workaround : kdub 20091228  
)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_RootSelect_OnClicked (/ root)
 (if (setq Root (dcl_selectfolder "Select Root Folder" g:K60017h_RootFolder nil))
   (progn (setq g:K60017h_RootFolder root
                g:InsertData nil
          )
          (dcl_tree_clear K60017h_F_Tree)
          (dcl_listbox_clear K60017h_F_ListBox)
          (dcl_dwgpreview_clear K60017h_F_DwgPreview)
          (c:K60017h_F_OnInitialize)
   )
 )
)
;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_DoAllTheWildStuff (/)
 (dcl_MessageBox "To Do: code must be added to event handler\r\nc:K60017h_DoAllTheWildStuff" "K60017h : To do")
)

;;;---------------------------------------------------------------------------
;;;

(princ)


Some attachments
LSP and ODCL Code and 29 seconds of piccys.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 28, 2009, 07:11:43 PM
The video attachment.
As you may see, sometimes the DwgPreview displays, sometimes not.
(refresh [F5] to replay)
Title: Re: OpenDCL 6 Display Issues
Post by: owenwengerd on December 29, 2009, 09:04:14 AM
The DwgPreview problem is now fixed for Alpha 18. This was a simple case of not invalidating the control after changing the drawing filename.
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 29, 2009, 02:14:24 PM

Thanks Owen,
great to hear it' rectified,
better to hear it was relatively simple

Be well

Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on January 06, 2010, 05:02:57 PM

6.0.0.18 fixed the DwgPreview display issue for me ... thanks Owen

Regards
Kerry
Title: Re: OpenDCL 6 Display Issues
Post by: superkot007 on December 05, 2010, 01:02:01 PM
Quote from: Kerry Brown on December 28, 2009, 07:04:41 PM
Demo/Sample

Code (autolisp) Select

;;K60017h.lsp
;;K60017h.odcl
;|
KWBrown 20091229
for OpenDCL 6.0.0.17 testing
to demonstrate painting of DwgPreview control
|;
;; Initial folder for DirectoryPicker

(setq g:K60017h_RootFolder "J:\\Blocks")


(defun c:DOIT (/) (c:K60017h))

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h (/)
 ;; Codehimbelonga kdub@opendcl.com
 (vl-load-com)
 (command "._OPENDCL")
 (dcl_project_load "K60017h.odcl" t)
 (if (not (dcl_form_isactive K60017h_F))
   (dcl_form_show K60017h_F)
 )
 (princ)
)
(princ "\n K60017h to run.")
(princ)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_OnInitialize (/ ParentID Folders)
 (dcl_control_settext K60017h_F_RootFolder g:K60017h_RootFolder)
 ;;
 (setq ParentID (dcl_tree_addparent K60017h_F_Tree g:K60017h_RootFolder 0 -1 1))
 (if (= ".." (cadr (setq Folders (vl-directory-files g:K60017h_RootFolder NIL -1))))
   (setq Folders (cddr Folders))
 )
 ;;
 (foreach folder Folders
   (dcl_tree_addchild
     K60017h_F_Tree
     (list (list ParentID folder (strcat g:K60017h_RootFolder "\\" folder) 2 3))
   )
 )
 (dcl_tree_expanditem K60017h_F_Tree ParentID 1)
 ;;
 (dcl_tree_selectitem K60017h_F_Tree
                      (dcl_tree_getfirstchilditem K60017h_F_Tree ParentID)
 )
)
;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_Tree_OnSelChanged (Label Key / SubFiles SubFolders subList)
 ;;
 ;| Description:



 |;
 (dcl_listbox_clear K60017h_F_ListBox)
 ;;
 ;;(or (= (type Key) 'str) (setq Key g:K60017h_RootFolder))
 (if (= (type Key) 'str)
   (progn
     (setq g:SelectedFolder key
           SubFiles         (vl-directory-files g:SelectedFolder "*.DWG" 1)
     )
     (if (= ".." (cadr (setq SubFolders (vl-directory-files g:SelectedFolder NIL -1))))
       (setq SubFolders (cddr SubFolders))
     )
   )
 )
 ;;
 (if SubFolders
   (progn (setq subList '())
          (foreach folder SubFolders
            (setq subList (cons (list g:SelectedFolder
                                      folder
                                      (strcat g:SelectedFolder "\\" folder)
                                      2
                                      3
                                )
                                subList
                          )
            )
          )
          (dcl_tree_addchild K60017h_F_Tree (reverse subList))
   )
 )
 ;;
 (if subFiles
   (progn (setq subList '())
          (foreach file subFiles (setq subList (cons file subList)))
          (dcl_listbox_clear K60017h_F_ListBox)
          (dcl_listbox_addlist K60017h_F_ListBox (reverse subList))
          ;;
          (dcl_listbox_setcursel K60017h_F_ListBox 0)
          (dcl_dwgpreview_loaddwg
            K60017h_F_DwgPreview
            (strcat g:SelectedFolder "\\" (dcl_listbox_getitemtext K60017h_F_ListBox 0))
          )
          ;; (dcl_Control_Redraw K60017h_F_DwgPreview) ;; <-- redraw added for workaround : kdub 20091228  
     )
 )
)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_ListBox_OnSelChanged (ItemIndexOrCount Value /)
 (dcl_dwgpreview_loaddwg K60017h_F_DwgPreview (strcat g:SelectedFolder "\\" Value))
 ;;
 ;; (dcl_Control_Redraw K60017h_F_DwgPreview) ;; <-- redraw added for workaround : kdub 20091228  
)

;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_F_RootSelect_OnClicked (/ root)
 (if (setq Root (dcl_selectfolder "Select Root Folder" g:K60017h_RootFolder nil))
   (progn (setq g:K60017h_RootFolder root
                g:InsertData nil
          )
          (dcl_tree_clear K60017h_F_Tree)
          (dcl_listbox_clear K60017h_F_ListBox)
          (dcl_dwgpreview_clear K60017h_F_DwgPreview)
          (c:K60017h_F_OnInitialize)
   )
 )
)
;;;---------------------------------------------------------------------------
;;;
(defun c:K60017h_DoAllTheWildStuff (/)
 (dcl_MessageBox "To Do: code must be added to event handler\r\nc:K60017h_DoAllTheWildStuff" "K60017h : To do")
)

;;;---------------------------------------------------------------------------
;;;

(princ)


Some attachments
LSP and ODCL Code and 29 seconds of piccys.
Thank you so much!!!
This is exactly what I needed!!!
Title: Re: OpenDCL 6 Display Issues
Post by: Kerry on December 05, 2010, 06:17:29 PM

You're most welcome.
That code was concept code and still needed a little work to be bomb-proof ... but IS a reasonable place to start.
Title: Re: OpenDCL 6 Display Issues
Post by: superkot007 on December 06, 2010, 09:35:39 AM
Quote from: Kerry Brown on December 05, 2010, 06:17:29 PM

You're most welcome.
That code was concept code and still needed a little work to be bomb-proof ... but IS a reasonable place to start.
Of course, I understand this ... :)

I am a novice user, so please help ...
How to immediately specify the folder with the blocks without the left of the tree?

P.S.: Sorry if bad writing - it's machine translation