Results 1 to 13 of 13

Thread: Icons

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Icons

    Hi

    I put incos in toolbar, but when Click in button the image disappears, please see figures attached

    Why Icons disappears ?
    Attached Images Attached Images    

  2. #2

  3. #3

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    Toolbar and Imagelist

  4. #4

  5. #5

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    thank you

    But I do same code for others buttons and They work fine , only two buttons no work



    Code:
     tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
            tbRelatorio.Buttons("CRONOGRAMA").Value = tbrUnpressed
            tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
             tbRelatorio.Buttons("CONVIDADOS").Value = tbrUnpressed

  6. #6

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    I believe is because the images that I put in Imagelist, in toobar I change index for other figure that work fine and too wotk fine

    How can I to know if a figure will work fine ?



    Tia

  7. #7
    Hyperactive Member
    Join Date
    Aug 2009
    Location
    Anywhere I want to.
    Posts
    408

    Re: Icons

    buttons change size when pressed so maybe your image could be a little smaller or you button could be a little bigger to make it work when pressed. This is true even with just text on a command button.

  8. #8

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    Ok

    But What bmp or icons work fine when I click in toolbar, How can I to know ?

  9. #9
    Hyperactive Member
    Join Date
    Aug 2009
    Location
    Anywhere I want to.
    Posts
    408

    Re: Icons

    try different sizes and see what fits the buttons.
    if your icons are dynamic (change often) then you can check to see if they will owrk or
    you can always resize or clip icons a little to fit better.

  10. #10
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Icons

    I think the Toolbar has an image list for when the button is pressed and not pressed, and I think you have set the Imagelist only for the not pressed.

  11. #11

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    Why ohters buttons have only one image and work fine ?

  12. #12
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Icons

    OK, then I think you need to post your code so we can check where the problem is...

  13. #13

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Icons

    See below
    tia


    Code:
    Private Sub tbRelatorio_ButtonClick(ByVal Button As MSComctlLib.Button)
        Select Case Button.Key
        Case "CRONOGRAMA"
            fraFiltrosA = "FILTROS PARA GERAÇÃO DO CRONOGRAMA"
            fraFiltrosA.ForeColor = &H80FF&
            fraFiltrosA.Enabled = True
            fraFiltrosB.Enabled = True
    
            tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
            tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
            tbRelatorio.Buttons("CONVIDADOS").Value = tbrUnpressed
             tbRelatorio.Buttons("ESTOQUEUSO").Value = tbrUnpressed
            tbRelatorio.Buttons("GERAR").Enabled = True
            dtpDe.Visible = False
            dtpDe.UpDown = True
            ' dtpDe.Month = Month(Now())
            dtpDe.Value = Format(Now(), "mm/yyyy")
            dtpDe.Format = dtpCustom
            dtpDe.CustomFormat = "MM/yyyy"
            dtpDe.Visible = True
            habilita_frame_convaidados False
    
    
           ' lbxAnoInicio.Enabled = False
    
        Case "TABELADINAMICA"
            fraFiltrosA = "FILTROS PARA GERAÇÃO DA TABELA DINAMICA"
            fraFiltrosA.ForeColor = &HC0C000
            fraFiltrosA.Enabled = True
            fraFiltrosB.Enabled = True
    
            tbRelatorio.Buttons("CRONOGRAMA").Value = tbrUnpressed
            tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
            tbRelatorio.Buttons("CONVIDADOS").Value = tbrUnpressed
            tbRelatorio.Buttons("ESTOQUEUSO").Value = tbrUnpressed
            tbRelatorio.Buttons("GERAR").Enabled = True
            dtpDe.Value = Format(Now(), "dd/mm/yyyy")
            dtpDe.CustomFormat = "dd/MM/yyyy"
            dtpDe.UpDown = False
            lbxAnoInicio.Enabled = True
            habilita_frame_convaidados False
        Case "GRUPOSEITENS"
            fraFiltrosA = "FILTROS PARA GERAÇÃO DO RELATÓRIO DE GRUPOS E ITENS"
            fraFiltrosA.ForeColor = &HC000&
            fraFiltrosA.Enabled = True
            fraFiltrosB.Enabled = True
    
            tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
            tbRelatorio.Buttons("CRONOGRAMA").Value = tbrUnpressed
            tbRelatorio.Buttons("CONVIDADOS").Value = tbrUnpressed
            tbRelatorio.Buttons("ESTOQUEUSO").Value = tbrUnpressed
            tbRelatorio.Buttons("GERAR").Enabled = True
            dtpDe.Value = Format(Now(), "dd/mm/yyyy")
            dtpDe.CustomFormat = "dd/MM/yyyy"
            dtpDe.UpDown = False
            lbxAnoInicio.Enabled = True
            habilita_frame_convaidados False
        Case "CONVIDADOS"
            fraFiltrosA = "FILTROS PARA GERAÇÃO DE CONVIDADOS"
            fraFiltrosA.ForeColor = &HC000&
            fraFiltrosA.Enabled = True
            fraFiltrosB.Enabled = True
    
    
            tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
            tbRelatorio.Buttons("CRONOGRAMA").Value = tbrUnpressed
            tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
            tbRelatorio.Buttons("ESTOQUEUSO").Value = tbrUnpressed
            tbRelatorio.Buttons("GERAR").Enabled = True
            dtpDe.Value = Format(Now(), "dd/mm/yyyy")
            dtpDe.CustomFormat = "dd/MM/yyyy"
            dtpDe.UpDown = False
            lbxAnoInicio.Enabled = True
            habilita_frame_convaidados True
         Case "ESTOQUEUSO"
            fraFiltrosA = "FILTROS PARA GERAÇÃO DE ESTOQUE X USO"
            fraFiltrosA.ForeColor = &HC000&
            fraFiltrosA.Enabled = True
            fraFiltrosB.Enabled = True
    
    
            tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
            tbRelatorio.Buttons("CRONOGRAMA").Value = tbrUnpressed
            tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
             tbRelatorio.Buttons("CONVIDADOS").Value = tbrUnpressed
            tbRelatorio.Buttons("GERAR").Enabled = True
            dtpDe.Value = Format(Now(), "dd/mm/yyyy")
            dtpDe.CustomFormat = "dd/MM/yyyy"
            dtpDe.UpDown = False
            lbxAnoInicio.Enabled = True
            habilita_frame_convaidados False
        Case "GERAR"
            pcbAguarde.Visible = True
            pcbAguarde.ZOrder (0)
            If tbRelatorio.Buttons("CRONOGRAMA").Value = tbrPressed Then
                GeraCronograma
            End If
            If tbRelatorio.Buttons("TABELADINAMICA").Value = tbrPressed Then
                GeraTabelaDinamica
            End If
            If tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrPressed Then
                GeraGruposItens
            End If
            If tbRelatorio.Buttons("CONVIDADOS").Value = tbrPressed Then
                GeraConvidados
            End If
             If tbRelatorio.Buttons("ESTOQUEUSO").Value = tbrPressed Then
                GeraEstoqueUso
             End If
            
            
            pcbAguarde.Visible = False
            Exit Sub
        Case "LIMPAR"
            LimpaFiltros
        Case "SAIR"
            Unload Me
            Exit Sub
        End Select
        HabilitaShapes True
        HabilitaListas True
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width