×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    custom control help!!!!!!!!!!!!!

    hi

    i am developing an application in which 5 views contain same thing i.e three labels and an editor.
    is there any solution so that i create these controls one time and then use them in all my views?

    what should i do to fulfill this requirement? would this be a custom control? if this is then how to create such a control?
    plz suggest in steps..


    thanx

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: custom control help!!!!!!!!!!!!!

    just derive the custom control from CCoeControl, and have the required controls used inside it, then you just need to construct the main conatiner when ever you are needing it..

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    if i derive it from ccoecontrol it would be a container right?
    now can i use this container to be drawn in another container?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: custom control help!!!!!!!!!!!!!

    Yep, it would be a container, basically all UI controls are derived from CCoeControl, thus in essesnce they all are containers..

  5. #5
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    thanks man

    take care

  6. #6
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    hi

    i created the composite control and implemented all the necessary functions for a CCoeControl.
    now i have to include this composite control in another container. I created an instance of it as any other normal control
    but it is not showing up.

    can anyone tell me what i have left that it is not showing up?

    i have implemented the CountComponentControls and ComponentControl for both the composite control as well as the container in which i want to include it.


    any suggestions


    thank u

  7. #7
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    is it not possible to draw one container(having controls on it) onto another?

    what am i missing?


    thank u guys

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: custom control help!!!!!!!!!!!!!

    I'm not getting the question, I was trying to tell to have controls inside a control, which is same as containers inside sontainers.. So what have you tried and what kind of problems have you encountered..

  9. #9
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    ok let me explain

    i derived a class from CCoeControl..
    created three controls in it(labels and editor)
    implemented all the required functions for a CCoeControl class.
    i think this becomes my composite control. isn't it?

    then i have 4 views in my applications. i want to have this above created container control in all those views...
    hope now u got it...

    to achieve this, i created an instance of the container control in first container of my app. Now this container is also derived from the CCoeControl right?
    i called the following to draw that container control on the first container of my app

    iCompositeControl = CCompositeControl::NewL(aRect);
    iCompositeControl->SetContainerWindowL(*this);
    iCompositeControl->SetFocus(ETrue);

    is there anything i have to do to get what i want?

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: custom control help!!!!!!!!!!!!!

    looks good to me, does it work ?

  11. #11
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    no its not working?

    i will revert back after some debugging ok

    thank u

  12. #12
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    hi

    i have labels and edwin in one of my container. I am using it as a control in another container.
    but when i try to use them in another container i am getting KernelExec 3 panic.

    if i use only labels in that container control and then use it in another container, it works fine.
    but if i use only edwin in the container and then use it in another container, it gives me KernelExec 3 panic.

    i am not able to understand what is the different with the edwin control than the labels.

    do u have some suggestions?

  13. #13
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: custom control help!!!!!!!!!!!!!

    hi

    I created an CEikEdwin control in a container so as to make that container a control in itself.
    now when i try to use this container in a new container, it gives me kernelexec 3 panic.

    but if i create a CEikLabel control on that container and then i use it as a control in another container,
    it works fine. i did not understand the problem and still have found the solution

    can anybody has answer to this problem?

    thank u

  14. #14
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: custom control help!!!!!!!!!!!!!

    you should debug the code to find out which line is giving the error, basically it is Memory violation error, most usually a use of invalid pointer.

Similar Threads

  1. How to create a custom tab control
    By murthy.pramod in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-09-23, 08:14
  2. problem Kernel Exec 3 on adding CEikRichTextEditor in custom control
    By praveenp in forum Symbian User Interface
    Replies: 9
    Last Post: 2008-09-02, 09:22
  3. Custom control in CAknDialog
    By Diamond in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-02-27, 12:14
  4. custom control using editors
    By santosh shetty in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-12-12, 08:53
  5. custom control - clipping problem
    By boumitran in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-05-17, 06:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×