Change color in a progress bar

Discussion in 'Questions (Windows Mobile)' started by 2220, Sep 27, 2008.

  1. 2220

    2220 Member Licensed User

    Sorry in Advance, i'm new in B4P and don't know the tricks, yet.

    I'm not able to change the color bar of my progress bar created in runtime. I need some help.

    Another question.
    How can I set parent to a panel when I create the Progressbar in Runtime?

    Joan
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Hi,
    It is not possible to change the ProgressBar color. The color is set by the system's color settings.

    You should use:
    Code:
    pbar.New1("Panel1",...)
     
  3. Cableguy

    Cableguy Expert Licensed User

    Are you using the controlEX dll?
    If so, from it's help file:
    progressBar1.New1("Form1",10,10,200,30)

    Form1 is the parent of the created Progressbar1...
    But if you need to create more than one progressbar, just add the object to the object collection and create the control only when needed, or if you just want to change the one you created to anothet form, then the easy wasy would be to dispose the progressbar and create a new one....

    XIIIIII Just noticed that progressbar does NOT have a dispose method, (will be added in a future dll update???)...
    so you need to add the formlib dll and use the changeparent method for that...


    PS:EREL has beaten me to the clock....;)
     
    Last edited: Sep 27, 2008
  4. 2220

    2220 Member Licensed User

    Yes, I'm using the ControlEX Library.

    Thank you.
    Joan
     
  5. Zenerdiode

    Zenerdiode Active Member Licensed User

    Mine does...
     

    Attached Files:

  6. Cableguy

    Cableguy Expert Licensed User

    I'm still using 6.30 and the default dlls taht came with it...what are you using, is this your own dll?
    Dispose wouldn't be that hard to add to the dll, but i've had some heat for messing with someone else's dlls...
     
  7. klaus

    klaus Expert Licensed User

    Hi Paulo,

    I tried it in B4PPC V6.30. It works !

    The parameter is not explained in the help file. But it exists.
    If you write the name of the progressbar and the dot, the Dispose property will appear.

    Best regards.
     
  8. Cableguy

    Cableguy Expert Licensed User

    I only looked at the help file, thanks for the explanation,Klaus...
     
  9. Zenerdiode

    Zenerdiode Active Member Licensed User

    Sorry Paulo, I forgot to mention (however, Klaus did :)) that I was using the native ControlsEx Library.

    I'm using the .dispose methods for all objects in Form1_Close because I've had problems with the Serial2.dll before - I exited from my app and could not restart it until I had done a soft reset on the device.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice