Creating an Infrastructure of Your Own [Part 2]

    By: Mr. Rik Brooks on Apr 01, 2014

    This article is a continuation of the article "Creating Your Own Interface [Part 1]" that was recently published in the March 2014 issue of the ISUG-TECH Journal. The code in this article is dependent upon the code from that article being in place.

    If you have followed my articles for a long time you may remember that I’ve written similar articles. Those are similar but not the same. As I’ve gained experience as a programmer, my code has become tighter and more memory efficient. The code in this article reflects that experience.

    With this article, we will expand upon the concept of Service Based Architecture. While the last article introduced you to an object (the datawindow row handler) this article will introduce you to a set of visual objects that will be registered to the datawindow at runtime.

    We will have to think generically, and we will have to seriously consider inheritance and how it works.

    The Infrastructure
    First, we create a base class that will provide the functionality that all datawindow picturebuttons need. We are going to call it dw_pb_new. So create a new Standard Visual object and select PictureButton. When you get to the painter, delete the text. I selected the New picture for it just so that I could size it correctly. Set it to Flat Style, 3D colors, and Original Size. Next we need an instance variable of type dw_ancestor. While we are there let’s give the picturebuttons a functions object


    Login to read the article. Not a member? Create a free account!




    Copyright © 2014 ISUG-TECH. All Rights Reserved
    All material, files, logos and trademarks within this site are copyright their respective organizations

    Terms of Service - Privacy Policy - Contact the Help Desk