Project 5: Solving More Problems
Your homework project involves solving another series of problems. To complete this project you'll need to download problem solving project below.Instructions
To complete this project follow these steps.You will need to write code for the problems 1 through 40 to complete this homework project. Scroll down in the main unit to see the problems. Beginning with problem 1 you should see the following code:
1. Use this download link to get a copy of this homework project on your computer.
2. Move the file moreproblems.7z to your homework folder.
3. Extract the contents of file above.
4. Use the Lazarus IDE to open the project moreproblems.lpi.
procedure TMoreProblemsForm.Problem1; begin { Set the radio group items to the content of the memo } end;Below the comment with the problem instructions provide the necessary code to solve the problem. Run the project, select the problem on the left, and click the run button to test your solution.
If you think your solution works move on to the next problem and repeat with the next problem. If you get stuck on a problem consider moving on to the next problem. Solve as many problems as you can.
Here is a full listing of all the problems.
procedure TMoreProblemsForm.Problem1; begin { Set the radio group items to the content of the memo } end; procedure TMoreProblemsForm.Problem2; begin { Set the edit content to the radio group item if a radio group item is selected else set the edit to blank text } end; procedure TMoreProblemsForm.Problem3; begin { If the checkbox is checked select the first radio group item } end; procedure TMoreProblemsForm.Problem4; begin { Remove all radio group items } end; procedure TMoreProblemsForm.Problem5; begin { Set the edit content to the number of radio group items. If there are 3 radio group items the edit should read '3' } end; procedure TMoreProblemsForm.Problem6; begin { Set the Brush Color on the shape control to the colorbox Selected color } end; procedure TMoreProblemsForm.Problem7; begin { If the colord dialog is Executed then use its value to set the shape control Brush Color, the colorbox Selected color, and the edit content using ColorToString } end; procedure TMoreProblemsForm.Problem8; begin { Set the shape control to a circle } end; procedure TMoreProblemsForm.Problem9; begin { Set the shape control to a triangle } end; procedure TMoreProblemsForm.Problem10; begin { Move the shape control to the Top of its parent } end; procedure TMoreProblemsForm.Problem11; begin { Set the shape control Pen Width to the edit content as an integer and the Pen Color to the colorbox Selected color } end; procedure TMoreProblemsForm.Problem12; begin { If the open dialog is Executed the load the FileName into the memo content } end; procedure TMoreProblemsForm.Problem13; begin { If the open dialog is Executed the load the FileName into the image control using its Picture property } end; procedure TMoreProblemsForm.Problem14; begin { Set the the image control Stretch to True } end; procedure TMoreProblemsForm.Problem15; begin { Toggle the visibility of the image control } end; procedure TMoreProblemsForm.Problem16; begin { Set the form's Color to the trackbar Position multipied by 255 } end; procedure TMoreProblemsForm.Problem17; begin { Increase the trackbar Positon by 5. If the Position would be great than its Max set the Position to 0 instead. } end; procedure TMoreProblemsForm.Problem18; begin { Set the progress Position to match the trackbar Position } end; procedure TMoreProblemsForm.Problem19; begin { Set Width of the form to the trackbar Position times 5 plus 400 } end; procedure TMoreProblemsForm.Problem20; begin { Set the progress style to marquee } end; procedure TMoreProblemsForm.Problem21; begin { Set the progress Max to 750 and its Postition to half that value } end; procedure TMoreProblemsForm.Problem22; begin { Change the caption of the advanced sheet to the content of the edit control } end; procedure TMoreProblemsForm.Problem23; begin { Make the advanced sheet the first tab and the standard sheet the second tab } end; procedure TMoreProblemsForm.Problem24; begin { Make the advanced sheet the Active page of the page control } end; procedure TMoreProblemsForm.Problem25; begin { Remove all sheets by Free'ing each sheet } end; procedure TMoreProblemsForm.Problem26; begin { Set the string grid RowCount to the content of the edit control as a number } end; procedure TMoreProblemsForm.Problem27; begin { Set the edit control content to the string grid Cells[1, 1] } end; procedure TMoreProblemsForm.Problem28; var R: TGridRect; begin { Set the edit control content to the string grid Selection } R := StringGridControl.Selection; end; procedure TMoreProblemsForm.Problem29; var X, Y: Integer; begin { Set the string grid Cells[X, Y] to their 'X, Y' value as a string } for X := 1 to StringGridControl.ColCount - 1 do for Y := 1 to StringGridControl.Row - 1 do begin end; end; procedure TMoreProblemsForm.Problem30; begin { Clear the content of the string grid } end; procedure TMoreProblemsForm.Problem31; begin { Swap the PageIndex of the first and second sheet of the page control } end; procedure TMoreProblemsForm.Problem32; begin { Focus the memo then set its SelStart to 0 and its SelLength to the Position of the trackbar control } end; procedure TMoreProblemsForm.Problem33; begin { Mimimize the form } end; procedure TMoreProblemsForm.Problem34; begin { Set the caption of the form to the current time using Now and DateTimeToStr } end; procedure TMoreProblemsForm.Problem35; begin { Copy the contents of the memo to the clipboard } end; procedure TMoreProblemsForm.Problem36; begin { Set the memo contents to A, B and C, where each letter is on its own line } end; procedure TMoreProblemsForm.Problem37; begin { Set the form font to Arial } end; procedure TMoreProblemsForm.Problem38; begin { Disable the edit control } end; procedure TMoreProblemsForm.Problem39; begin { Remove the fixed rows and fixed columns of the grid control } end; procedure TMoreProblemsForm.Problem40; begin { Align the test panel to the right } end;If you are unsure of how to solve some of the problems within this homework project you may want to refer to our prior recent projects or search for help using the documentation.