Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border is not set using setBorderColor and setBorderStyle #176

Closed
VicMisael opened this issue Oct 30, 2020 · 2 comments · Fixed by #194
Closed

Border is not set using setBorderColor and setBorderStyle #176

VicMisael opened this issue Oct 30, 2020 · 2 comments · Fixed by #194
Assignees
Labels
bug Something isn't working
Milestone

Comments

@VicMisael
Copy link
Collaborator

Issue Title

The border is not set

Describe the bug

The border is not visible when set

To Reproduce

Just execute the following code:
Container ct=new Container();

    ct.setBorderStyle(Container.BORDER_SIMPLE);
    ct.borderColor=Color.BLUE;
    ct.setBackColor(Color.RED);
    add(ct, CENTER, CENTER,70,70);

Expected behavior

A blue border should be visible

Screenshots or videos

image

Devices:

Please complete the following information:

  • OS:Windows
  • OS Version: 10 2004
  • TotalCross Version: 6.1.1(Simulator)
@VicMisael VicMisael added the bug Something isn't working label Oct 30, 2020
@nmarquesin nmarquesin added this to the 7.0 milestone Nov 4, 2020
@ricardobna ricardobna self-assigned this Nov 5, 2020
@ricardobna
Copy link
Collaborator

Hey @VicMisael, can you check if this bug still happens on branch bugfix/container-border?

@VicMisael
Copy link
Collaborator Author

VicMisael commented Nov 11, 2020

Hi Ricardo,On the simulator and win32 it's fine, have a look

The only problem that I noticed, is that BORDER_RAISED, and BORDER_LOWERED properties only allow one color on the simulator
Sample code:

        Container ct=new Container();
       
        ct.setBorderStyle(Container.BORDER_SIMPLE);
        ct.borderColor=Color.BLUE;
        ct.setBackColor(Color.RED);
        add(ct, CENTER, CENTER,70,70);

        Container ct2=new Container();
       
        ct2.setBorderStyle(Container.BORDER_ROUNDED);
        ct2.borderColor=Color.BLUE;
        ct2.setBackColor(Color.RED);
        add(ct2, CENTER, CENTER+100,70,70);

        
        Container ct3=new Container();
       
        ct3.setBorderStyle(Container.BORDER_LOWERED);
        ct3.borderColor=Color.RED;
        ct3.setBackColor(Color.WHITE);
        add(ct3, CENTER+100, CENTER,70,70);
        
        Container ct4=new Container();
       
        ct4.setBorderStyle(Container.BORDER_RAISED);
        ct4.borderColor=Color.RED;
        ct4.setBackColor(Color.WHITE);
        add(ct4, CENTER+100, CENTER+100,70,70);

        Container ct5=new Container();
       
        ct5.setBorderStyle(Container.BORDER_TOP);
        ct5.borderColor=Color.RED;
        ct5.setBackColor(Color.WHITE);
        add(ct5, CENTER-100, CENTER,70,70);
        
        Container ct6=new Container();
       
        ct6.setBorderStyle(Container.BORDER_NONE);
        ct6.borderColor=Color.BLUE;
        ct6.setBackColor(Color.CYAN);
        add(ct6, CENTER-100, CENTER-100,70,70);

image

Simulator

image

Win32

image

Android

image

Raspberry PI

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants