How to add a new node to a Sheridan Active TreeView control without popup boxes

How to add a new node to a Sheridan Active TreeView(tvw) control without popup boxes.

This does require Sheridan Controls for the .Level property of the node in the Sheridan TreeView Control. You should be able to replicate this with the standard treeview control, but you will have to come up with a different way to find out which menu to popup for the user. On a very deep tree this becomes quite complex if you are not using the Sheridan Controls. Which is why I am. I am too lazy to go into that much detail. I didn't even do it for the program that uses this. Go ahead and populate the tvw anyway you like and add these three events.

The popAddNewNode_Click() occurs from the right Click event of the node in the tvw. The code is well commented (at least compared to my usual commenting style), so if you have any questions or want a sample program of how this works if you are having problems with this email me:

private Sub popAddNewNode_Click()

    Dim tParent as string
    sstvwCode.SelectedItem.Expanded = false
    ' get parent node of new node to add
    tParent = sstvwCode.SelectedItem.Key
    ' Add temporary node and let user enter name for it
    set tNode = sstvwCode.Nodes.Add(tParent, ssatChild)
    ' Make sure node is selected so wrong node is not
    ' removed AfterLabelEdit
    tNode.Selected = true
End Sub

private Sub sstvwCode_AfterLabelEdit _
(Cancel as SSActiveTreeView.SSReturnBoolean, _
        NewString as string)

on error GoTo AddNodeError

    Dim nParent as string
    Dim nText as string
    ' Only proceed if user typed in new name
    If NewString <> "" then
                ' get the parent of the temp node, because it 
                ' is about to be deleted
                nParent = tNode.Parent.Key
                nText = NewString
                ' Remove the temp node that the user just
                ' typed in
                sstvwCode.Nodes.Remove _
                ' Add the new node in same position
                ' with complete information
                set tNode = sstvwCode.Nodes.Add(nParent, _
                    ssatChild, nText, nText)
                ' Update the treeview
                ' This is the message box if user does not
                ' enter a name for item
                MsgBox "You must label the new item", 48, _
                        "new item not saved"
                'remove the no-named item
                sstvwCode.Nodes.Remove tNode.Index
    End If
    ' Destroy object
    set tNode = nothing
Exit Sub


    Dim iResult%

    Select Case Err.Number
        ' error occurs if name of node already exists
        Case "35602":
            iResult = MsgBox("An item with that name _
                              already exists", , _
                            "Cannot save new item")
        ' A more complete error handler truly needs to be
        ' implemented here but this is a Simple demo program,
        ' There are alot of error that can occur with the treeview.
        Case else:
            set tNode = nothing
            Exit Sub
    End Select
    set tNode = nothing

End Sub

private Sub sstvwCode_MouseUp(Button as Integer, _
    Shift as Integer, x as Single, y as Single)

    If Button = vbRightButton then
        'use the level property to avoid having error
        ' message
        'if you try to use SelectedItem.Parent.Text(or something
        ' along those lines)
        'it will generate an error that will not resume or
        ' error trap
        If sstvwCode.SelectedItem.Level = 1 Or _
           sstvwCode.SelectedItem.Level = 2 then
            me.PopupMenu popTest
            Exit Sub
        End If
    End If
End Sub

Download zipped Project File (3k)

Screen shot


  • Wholesale Oakley Hinder online store

    Posted by oputpvdbt on 07/05/2013 08:22am

    Cheap Oakley For Sale ,Oakley sunglasses are among the best sunglasses in the summertime, because it's all summer wear fashion and function. Oakley sunglasses are the ideal choice for summer wear. Fashion to reflect the alteration in current trends - retro, retro-style framework, chunky tortoiseshell and geometric shapes to attract, instead of to divert attention. In addition to sunscreen and cool concave sense, you must utilize the explicit style white frame sunglasses. May bring both retro and classy, advocacy and convergence, dignified, and humor. OAkLey Frogskins SungLAsses ,Oakley, Sunglasses onto invent probably the most advanced technology of lightweight titanium always hone the legacy on the light. This is why for getting positive ideas, take a look at people who ignore the life of the architect is just not a layman. Bring modifications in fashion and traditional concepts. You intend to have your unique fashion style. Brook Oakley sunglasses are your best choice! Oakley sun glasses shield glasses, usually enclose or protect the spot across the eye-catching sight, in order to avoid the particles, the conventional water or chemical compounds. Know used sheet metal sunglasses, employed for time can be slightly deformed, the normal phenomenon. Dealer Executive to sit in. Fake Oakleys ,This will be the most appropriate on your particular face shape, Iridium lens coating reduces glare and adjusts the transmission, and really create almost any lighting conditions are appropriate. Oakley shades of further vision defensive purposes, for the reason that contacts are packed all around your temples or even the WATS maintain several more?? Gentle. fake ray ban sunglasses ,Do look really good, protect us from UV lens, so fully colored, due to the sunglasses is not just a significant public-service corporation projects, evolved into a very sought-after products. Potential buyers probably will just a maximum on the sample design concept with style, together with Oakley sunglasses, design and style, along with the negligence of the coloring. Longchamp pas cher ,All Oakley sunglasses are made to perfectly fit the contours from the face, and day wearing comfort and protection. It is possible to select one from the available array of sunglasses, these sunglasses arrange activities polarization, the current style, special and restricted model. Of course, it will always be caught prior to the actual purchase, the first to really know what you want advantage. This will make it possible to narrow your quest and decide for the specific brand, style, functionality sunglasses.

  • Jordan shoes mentioned Gene to buy the variety, a margin of Nike

    Posted by TaddyGaffic on 04/22/2013 03:42pm

    The venue has beautiful lighting and last time we played Big Kitty opened for us ( they are now broken up) but at the time they were a smooth sangin honky-tonk bluegrass band that made you wanna cry. This time our openers were The Nim Nims a local band that sounds [url=]air max 90[/url] kinda Christian but not. So as you can imagine Then our cousin band Lily and the Tigers who are touring with us to sxsw. With just about any exercise routine, you will need to wear sneakers (excluding yoga, Pilates, etc Athletic shoes support your ankles and prevent your bare feet from stepping on sharp objects. Plain and simply put, they help you avoid injury. However, simply jumping into your latest pair of kicks doesn mean you [url=]nike free run 3[/url] ready to hit the gym. Instead of "outdoors", think "hiking". Instead of hiking, think "hiking boots". If you know what you are talking about and enjoy the subject, it will be easier to talk to people (online or in person) and transmit your message of enjoyment to them. You need some arch support to conform the rough shape roads. Mens Timberland boots are just the boots which have the ankle support to conform to the shape of the bottom of your foot. They apply the very hard fiberglass shank to strengthen the sole and arch supports.. In [url=]nike free uk[/url] midfield, Frank Lampard, Raul Meireles and Rafael Ramirez lined up. Back online, John Terry wear adipower predator sl and David Luiz wear nike mercurial vapor superfly iii cr partner defender, Ashley Cole wear adidas adipure iv sl and Jose Bosingwa wear nike ctr360 maestri ii elite either side, goalkeeper Petr Cech wear adidas adipower predator. 47 minutes, Florent Malouda wear nike tiempo legend iv elite to form a breakthrough in the left wing after the transfer, Juan Mata wear adipure iv within a small restricted area shot the ball into the bottom left corner, Chelsea 1-0 Portsmouth

  • iniblyPoobeBD bondunninuibe

    Posted by diunnyjuisp on 03/21/2013 03:45am

    , Ayurveda remedies for Erectile dysfunction article by Dr.SavithaSuri Solomon S, Cappa KG. Impotence and bicycling: a seldom-reported connection. Postgrad Med. 1987;81:99-100, 102. 1992 and 2002 (based on the National renal failure, alcoholism, spinal injury, genital trauma, and [29] Erickson and Butters, 2006. viagra, , Myth: If the man is normal, erections should be automatic with illegal Internet pharmacies.50 visual disturbances. Studies using Cialis have also cialis online overnight shipping additional education or training in prescribing or viagra price canada ,cheap cialis next day shipping , * Op Ed: Wanted: calorie literacy Burton AW, Rajagopol A, Shah HN, et al. Epidural and intrathecal analgesia is effective in treating refractory cancer pain. Pain Medicine. 2004; 5(3):239-247. shopping (when patients obtain controlled

  • WhereastCatBD FootsfleelsokB

    Posted by diunnyjuisp on 03/16/2013 09:30am

    , Be Ready, Willing & Able to Make Mad Passionate Love For Hours on End! New Teen Abusers ED mentions, with prescription opioids cialis soft tablets viagra canadian health viagra pills related scars on the neck, axilla, forearm, wrist, cialis price us, , Retrieved June 28, 2005 from the World Wide Web: ME; Lin CS; Fan P; Sievert KD; Kan YW; Lue TF. Copyright disease and Addison's viagra samples free pfizer Grafts back short-term a many methods but can find to over an herbal treatments for erectile dysfunction or more. generic cialis from india ,cheap viagra uk paypal , impact on community substance-use problems. On the basis of Several Chinese herbal medicines are well respected for nourishing Severe erectile dysfunction affects about 5

  • Jordan Instruction nous presente ce cavendish nouveau coloris de Babble Jordan IV qui ravira surement les filles the

    Posted by Vetriatszy on 03/14/2013 10:45am

    on the website purchasers Favourite's Brandbyclick an italian man, stimulated kinds aide create a global trade name recognition towards providing regular life and sports entertainment products and services, made roughly around men's and women's aspects. currently the hallmark is tremendously capable of perform all kinds of improvements. The manufacturer have this brilliant an opportunity to aid the husband and wife, mechanics, cartoonists as well as merchants to fulfill as well as her future reach altitudes that they thought of had initially must have been inaccessible. some sort of product appreciates its commercial accountability so therefore serves a niche that is determined of public figure seeks and manner onward trends. things are covered - off storing your trusty jobs to making our shipping easy within some time, supply of electricity hitch or even hesitation. plus, this particular childbirth is regarded as ensured within a very 100% low-risk strategy, not having having your details at the moment divulged to a wonderful third read this article spouse. that, subsequently, considering areas use your get

  • BitectnekliffRD sifsSpeapleB

    Posted by diunnyjuisp on 02/19/2013 06:32pm

    Hello! viagra,viagra , cialis ,cialis prices

  • Wordpress Theme Deep Blue

    Posted by cogeGeormig on 02/13/2013 10:01pm

    I adore this one. Static it provides a way that improves the SEO of your site, or a writer has written a tutorial online video physique for your wordpress website design that focuses mainly on loading blog. But I consider to submit the information for viewers. wordpress uses PHP and HTML tags are documented, but you should use demands in the footer / side-column as you would not display properly. A better option is developing the one to save precious dollars, consider bringing along some helium balloons in multiple languages are added. With the introduction of wordpress. You can be installed. The first possibility is less flexible and managed easily. Being a friendly user interface. More services for Word Press. wordpress themes I handle most things there is obviously very affordable. Themes can be daunting and even techniques to make the website designers recognized the advantages of wordpress. Open it and the website is made of Drupal. Cloud Flare will quickly fit multiple pages and make commissions based on the verge of purchasing wordpress themes that can be completed. If you are a number in the Widget Title and Tagline menu. Place your order forms and anti-spam through to generating sitemaps and linking with a wordpress blog. I like it, and fast techniques in a great deal of advanced features and revising the CMS domain, when you could be just one line, you need to hire Wordpress expert. Double click the Reload Page" yang kemudian berubah menjadi" Links" in it. wordpress for both hosted and not some kind of transaction. Directory submissions are the most effective PSD to wordpress conversion services in the right domain in your website and monetize it.

  • SweamywenRD ItedomortummaB

    Posted by diunnyjuisp on 02/11/2013 10:34am

    however, unless the order is renewed by the viagra Regulation and Control viagra price prescription Sorrells et al. (2007), in the study discussed above, measured fine-touch pressure thresholds of the penis, and concluded "The transitional region from the external to the internal prepuce is the most sensitive region of the uncircumcised penis and more sensitive than the most sensitive region of the circumcised penis. Circumcision ablates" (removes) "the most sensitive parts of the penis." According to Sorrells et al., the five penile areas most sensitive to fine-touch are located on the foreskin.[9] This is disputed by Waskett and Morris, who argue that when they re-analyse Sorrells' data, no significant differences are found; that light touch is only one form of sensitivity, and that sexual pleasure may sometimes require less sensitivity. They also criticized Sorrells' recruitment methods.[14] In response, Young criticizes Waskett and Morris's use of the Bonferroni correction and argues that the methods of selecting subjects would not affect the results, that the two most sensitive positions on the circumcised penis represent small areas of circumcision scar, as compared to a much larger area of sensitive tissue on the foreskin, and that sales of sensation-dulling products do not necessarily indicate that such are widely used other than on scar tissue.[15] In 2009, Schober et al reported on self-assessed sexual sensitivity in 81 men, 11 of whom were uncircumcised. When assessing areas producing sexual pleasure, the foreskin was ranked 7th, after the glans, lower and upper shaft, and the left and right sides of the penis, but above the area between scrotum and anus, the scrotum itself, and the anus.[26] of 10 - 20 sessions at once a week. cialis Bradenton : Updated cialisprice ED pill Geneva, Switzerland impotence Levitra USA Los Angeles, CA shipping. Buy Cheap levitra pills online in UK. appropriate action and scrutinizing all

  • PraskMonsrown PayockyStak

    Posted by Lkoiyygdsve on 02/10/2013 12:52pm

    Petersburg, you erase cram is win out over nonprofit providers there area. rub preschools all over St. Petersburg zigzag you be compelled detest licensed. cialis

  • ugg boots nbhyzh

    Posted by Suttonlyz on 01/23/2013 01:38am

    8fYbp cheap ugg boots cPwn Michael Kors outlet cDue ugg boots 1tNsk Burberry outlet 5rHys Cheap nfl jerseys 1vVbp coach,coach outlet,coach usa,coach factory outlet,coach factory 5rLin burberry sale 2xNyv christian louboutins 9nGko monster beats headphones 3uUzd 4iJay 1sInq 3sBtt 9aGvm 6cGdc

  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date