How to resolve the algorithm Pinstripe/Display step by step in the Gambas programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Pinstripe/Display step by step in the Gambas programming language
Table of Contents
Problem Statement
The task is to demonstrate the creation of a series of vertical pinstripes across the entire width of the display.
c.f. Colour_pinstripe/Display
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Pinstripe/Display step by step in the Gambas programming language
Source code in the gambas programming language
'WARNING this takes a time to display
'Use the 'gb.qt4' component
Public Sub Form_Open()
Dim iColour As Integer[] = [Color.Black, Color.white]
Dim hPanel As Panel
Dim siCount, siCounter, siSet As Short
With Me
.Arrangement = Arrange.Row
.Border = False
.Height = Desktop.Height
.Width = Desktop.Width
.Fullscreen = True
End With
For siCounter = 1 To 4
For siCount = 1 To Desktop.Width Step siCounter
hpanel = New Panel(Me)
hpanel.Width = siCounter
hpanel.Height = Desktop.Height / 4
HPanel.Background = iColour[siSet]
Inc siSet
If siSet > 1 Then siSet = 0
Next
Next
End
You may also check:How to resolve the algorithm Variables step by step in the Lingo programming language
You may also check:How to resolve the algorithm Subleq step by step in the Raku programming language
You may also check:How to resolve the algorithm Euler's constant 0.5772... step by step in the Picat programming language
You may also check:How to resolve the algorithm File input/output step by step in the S-BASIC programming language
You may also check:How to resolve the algorithm Conditional structures step by step in the Ol programming language