OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Oak3s on August 31, 2010, 02:03:24 PM

Title: Tab Strip - SlideView-Load ?
Post by: Oak3s on August 31, 2010, 02:03:24 PM
Currently I load some 150 slides oninitialize for form1. It takes about 4 seconds. I have 5 tabs and would like to only load the slides on the specific tab I am on rather than all of them. How do I do that? :) Thanks for any help.
Title: Re: Tab Strip - SlideView-Load ?
Post by: BazzaCAD on August 31, 2010, 02:08:51 PM
Add the "SelChanging" event to your Tab control & load the slides when it fires...
Title: Re: Tab Strip - SlideView-Load ?
Post by: Oak3s on August 31, 2010, 04:18:43 PM
Thank you.

So what is the itemindex?
"ItemIndex is the index of the currently selected tab."

I guess a better question is, how do I know what the "index" is? Is this the tab caption?
Title: Re: Tab Strip - SlideView-Load ?
Post by: BazzaCAD on August 31, 2010, 05:05:15 PM
Look in the syntax row: "ItemIndex [as Long (http://www.opendcl.com/HelpFiles/index.php?page=Reference/DataType/Long.htm)]"

The ItemIndex is the current Tab page starting at 0.

Code (autolisp) Select

(defun c:Untitled_Form1_TabStrip1_OnSelChanging (ItemIndex /)
 (cond
   ((= ItemIndex 0)
      ;;load some slides here...
   )
   ((= ItemIndex 1)
      ;;load some other slides here...
   )
   ((= ItemIndex 2)
      ;;load some more slides here...
   )
 )
)
Title: Re: Tab Strip - SlideView-Load ?
Post by: Oak3s on August 31, 2010, 06:16:02 PM
Thanks Barry. I got it to work but its to slow to load the slides. The tab is blank with a bunch of outlines for about half a second and thing *pop* they are there. But thanks again. Good learning.
Title: Re: Tab Strip - SlideView-Load ?
Post by: BazzaCAD on September 01, 2010, 10:21:26 AM
Ya sorry, that's just how long it takes to load the slides.
Are you using individual side files or did you combine them into a slide library? The l library maybe faster, but I haven't tested on a large set of files to compare.