VBAndCs / sVB-Small-Visual-Basic

Small Visual Basic (sVB) is an educational programming language, created by Eng. Mohammad Hamdy as an evolved version of Microsoft Small Basic (SB). It is meant to be easier and more powerful at the same time, to introduce programming basics to kids and beginners of any age, provided that they can use the English keyboard on the Windows OS.
Other
233 stars 16 forks source link

The label's border is separated from its image by a small margin. #68

Closed dynamicboy closed 5 months ago

dynamicboy commented 5 months ago

version: sVB 3.0.7.3 details: The label's border is separated from its image by a small margin, with a margin-left and margin-top of approximately 6 pixels, which complicates precise image placement calculations; this margin also affects the AddGraph* methods used in the label.

VBAndCs commented 5 months ago

Please provide a screenshot.


From: dynamicboy @.> Sent: Friday, June 14, 2024 4:30 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The label's border is separated from its image by a small margin. (Issue #68)

version: sVB 3.0.7.3 details: The label's border is separated from its image by a small margin, with a margin-left and margin-top of approximately 6 pixels, which complicates precise image placement calculations; this margin also affects the AddGraph* methods used in the label.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXCESOKV654R76Q6TDZHMLBZAVCNFSM6AAAAABJKU7HC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNZRGEZTMOI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

VBAndCs commented 5 months ago

Please close this issue, and all your old issues that are fixed. I don't have full access to this repo right now, and others complained about fixed issues that are still open. Thanks


From: dynamicboy @.> Sent: Friday, June 14, 2024 4:30 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.***> Subject: [VBAndCs/sVB-Small-Visual-Basic] The label's border is separated from its image by a small margin. (Issue #68)

version: sVB 3.0.7.3 details: The label's border is separated from its image by a small margin, with a margin-left and margin-top of approximately 6 pixels, which complicates precise image placement calculations; this margin also affects the AddGraph* methods used in the label.

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/68, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXCESOKV654R76Q6TDZHMLBZAVCNFSM6AAAAABJKU7HC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNZRGEZTMOI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

dynamicboy commented 5 months ago

Please provide a screenshot. ____ From: dynamicboy @.> Sent: Friday, June 14, 2024 4:30 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.> Subject: [VBAndCs/sVB-Small-Visual-Basic] The label's border is separated from its image by a small margin. (Issue #68) version: sVB 3.0.7.3 details: The label's border is separated from its image by a small margin, with a margin-left and margin-top of approximately 6 pixels, which complicates precise image placement calculations; this margin also affects the AddGraph methods used in the label. — Reply to this email directly, view it on GitHub<#68>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXCESOKV654R76Q6TDZHMLBZAVCNFSM6AAAAABJKU7HC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNZRGEZTMOI. You are receiving this because you are subscribed to this thread.Message ID: **@.***>

2024-06-15_123112

2024-06-15_123406

VBAndCs commented 5 months ago

Each control has a default padding, like 1 for button and 5 for label. The 5 point padding of the label displays a suitable margin around its text, but it seems annoying in your image with border case. You have 3 options now:

  1. Drag the image from your file system and dtop it on the form designer. This will add it in the label with 0 padding.
  2. Open the sVB bin folder in your installation folder, and navigate to bin\Debug\ToolBox\Controls, and open the Label.xaml filee in notepad, then change the label definition to:
  3. You can change the padding of the label in the form.xaml file, which will affect that label only, but this file is auto generated every time you make a change to the form designer, so, you will need to make suree to do this before you deploy your app.

At my end, I can add the Padding property to all controls, or at least to the label. But this will raise the question about adding the Margin property too, hut since there are no container controls in sVB except the form, I see no need for it. What do you think?


From: dynamicboy @.> Sent: Saturday, June 15, 2024 4:47 AM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Mohammad Hamdy Ghanem @.>; Comment @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] The label's border is separated from its image by a small margin. (Issue #68)

Please provide a screenshot. … ____ From: dynamicboy @.> Sent: Friday, June 14, 2024 4:30 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Subscribed @.> Subject: [VBAndCs/sVB-Small-Visual-Basic] The label's border is separated from its image by a small margin. (Issue #68https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/68) version: sVB 3.0.7.3 details: The label's border is separated from its image by a small margin, with a margin-left and margin-top of approximately 6 pixels, which complicates precise image placement calculations; this margin also affects the AddGraph methods used in the label. — Reply to this email directly, view it on GitHub<#68https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/68>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVXCESOKV654R76Q6TDZHMLBZAVCNFSM6AAAAABJKU7HC2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNZRGEZTMOI. You are receiving this because you are subscribed to this thread.Message ID: @.*>

2024-06-15_123112.png (view on web)https://github.com/VBAndCs/sVB-Small-Visual-Basic/assets/7421525/47c00573-e670-485a-aabb-b20ba952538a

2024-06-15_123406.png (view on web)https://github.com/VBAndCs/sVB-Small-Visual-Basic/assets/7421525/86f5e859-8202-49ff-8dff-a2379c360ce3

— Reply to this email directly, view it on GitHubhttps://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/68#issuecomment-2169126347, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQ5MVQW6JANLEFQG6FU2HLZHPBNNAVCNFSM6AAAAABJKU7HC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRZGEZDMMZUG4. You are receiving this because you commented.Message ID: @.***>

VBAndCs commented 5 months ago

I just updated sVB to v 3.0.7.4, with some fixes and added the Control.Padding property, where you can set it to 0 for the label to remove the margin. Label1.Padding = 0 Pease close this issue of this solves your issue. Thanks.