Step Wizard

Share your advanced PureBasic knowledge/code with the community.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Step Wizard

Post by ricardo »

Great!!

Its possible to change the color of one or some items? No the entire ones, just some of them.
ARGENTINA WORLD CHAMPION
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Step Wizard

Post by boddhi »

ricardo wrote: Its possible to change the color of one or some items? No the entire ones, just some of them.
To do this,
Into Oliver13's code, add some lines in procedure SetWizard()

Code: Select all

[...]
For i=0 To icount-1
  If iSelected=i+1
    ; *************************************
    ; ****    Start of modification    ****
    ; *************************************
    If i = 2                          ; Added line (Here, 2 (0-based) is the 3th step we want to change for example)
      col = #Red                      ; Added line 
      textcol = #Yellow               ; Added line 
    Else                              ; Added line 
      col = selected_col
      textcol = selected_textcol
    EndIf                             ; Added line 
    ; ************************************
    ; ****    End of  modification    ****
    ; ************************************
  Else
    col=nonselected_col
    textcol=nonselected_textcol
  EndIf
[...]
 
Into StarBootics code, add some lines in procedure Private_Draw()

Code: Select all

[...]
If StartVectorDrawing(CanvasVectorOutput(GadgetID))
  For Index = 0 To StepCount - 1
    If *StepWizardA\StepID = Index + 1
      ; *************************************
      ; ****    Start of modification    ****
      ; *************************************
      If *StepWizardA\StepID=3                        ; Added line (Here, 3 is the 3th step we want to change for example)
        Color=#Red|$FF000000                          ; Added line
      Else                                            ; Added line
        Color=*StepWizardA\SelectedColor|$FF000000
      EndIf                                           ; Added line
      ; ************************************
      ; ****    End of  modification    ****
      ; ************************************
    Else
      Color = *StepWizardA\NonSelectedColor | $FF000000
    EndIf
[...]
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Step Wizard

Post by ricardo »

Thnaks, the other day watching the code i find my way.

I will check your solution.

Thanks!!! :D
ARGENTINA WORLD CHAMPION
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Step Wizard

Post by boddhi »

ricardo wrote: Thnaks, the other day watching the code i find my way.
Cool! but if you find before anyone a solution to your own question, please publish it or say "Ok I've found"... It will save anyone spending time on it unnecessarily. :wink:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Step Wizard

Post by ricardo »

boddhi wrote: Tue Jul 30, 2024 5:46 pm
ricardo wrote: Thnaks, the other day watching the code i find my way.
Cool! but if you find before anyone a solution to your own question, please publish it or say "Ok I've found"... It will save anyone spending time on it unnecessarily. :wink:
But your answer is better :)

Thanks a lot !!!
ARGENTINA WORLD CHAMPION
Post Reply