3 Ways to Use Popup Menus in Lazarus _ LazPlanet



Comments



Description

3 ways to use Popup Menus in Lazarus | LazPlanethttp://lazplanet.blogspot.com/2013/08/3-ways-to-use-popup-menus-in-... Posts >66 $omments >66 !acebook 9ome 6tart 9ereD !4E >esources 3ews +utorials 4rticles Categories: 3 ways to use Popup Menus in Lazarus Pop Up menus pop when you right click on the application somewhere to make available the quick jobs in a menu. We explore 3 ways of using popup menus in La arus. Popup menus are common in many popular applications. !or example" in #L$ %e&ia Player 'or any other typical me&ia player( if you right click on the vi&eo area then a popup menu appears. )t lets you open me&ia files" play or pause" skip to the next song an& many more. La arus has a very easy implementation of this popup*style menu. La arus has a component name& +Popup%enu for this purpose. ,nce we create menus we can show it in 3 &ifferent ways" which ) will &emonstrate. 9ow to )nstall La arus :.;.< on Ubuntu :3.;= '>aring( Ubuntu :3.;= has been release& recently but its repo has an out&ate& version of La arus ';.?.3;.=(. La arus is at version :.;.< stable wi... 9ow to %ake La arus run in a 6ingle Win&ow +his tutorial shows you how to make la arus run with just one win&ow. )t is a goo& &ocking solution which will be integrate& in La arus ... 9ow to re&uce .exe file si e of your program @y &efault" La arus makes /A/s inclu&ing &ebug information which makes them extremely big. 1ou can strip out this &ebug information easil... )mage $opy PasteB 6toring an )mage in $lipboar& C >etrieving it )n paint programs" we see a function to copy an image to clipboar& an& paste it from there. Paste an image from anywhere" Photoshop" !iref... 9ow to 4&&" 7elete" $lear )tems of a List@ox Learn how to co&e a program to list 4lgorithms $onsole Programs $o&e 6nippets $ustom $ontrols 7atabases %ath 7ates !iles 7irectories !orm $ontrols List )teration 8ames 9+%L Web %isc 4u&io #i&eo 6creen 8raphics 37 8raphics 6ystem 4P) 6ecurity 9ar&ware +ext ,peration 4rtificial )ntelligence Popular this Month Creating the popup menu $reating the popup menu is easy. -ust &rop a +Popup%enu component in the form" then right click it an& choose .%enu /&itor..... +hen select the item you want to mo&ify then mo&ify it with the help of the ,bject )nspector *0 Properties. 1ou can then change the menu item caption" name" checke& etc. 1ou can also a&& items by right clicking any of the existing menu items in the menu e&itor win&ow. 1ou will have to create as many +Popup%enu components as many popup menus you want. Let2s just see it practically... $reate a new project 'Project*0 3ew Project*0 4pplication*0 ,5(. Creating a new popup menu and editing its items' properties 3ow &rop a +Popup%enu component in the form. 3ow right click it an& select .%enu /&itor..... 1 de 5 24/10/2013 11:06 p.m. 1ou can a&& new menu items by right clicking an& selecting .. Plug-in social de Facebook La#els +utorials '3F( $o&e 6nippets 'FF( 6ample $o&e 'FF( 4rticles ':?( ':3( '::( ':..blogspot.com/2013/08/3-ways-to-use-popup-menus-in-.. !or this you can click on the item to select it" then change the property from the .)nsert 3ew )tem 'after(.m. Using Popup Menu in 3 ways Way 1: Using the PopupMenu property (without ode! 1ou can skip all the mumbo jumbo an& show the popup menu without writing any co&eD )f you set the Popup%enu property of a component to the +Popup%enu you just prepare&" then the menu will appear when you right click on that component. %ake your own lists with your own programD Utili e this article to list many things . or . "ollowers Búscanos en Facebook 1ou will see : menu item alrea&y create& for you.ctober ':( ▼ 4ugust ':( 3 ways to use Popup %enus in La arus ► -uly '=( ► -une '<( ► %ay 'F=( 2 de 5 24/10/2013 11:06 p. .. $log Ar hi%e ▼ F.:3 'G. LazPlanet Me gusta A 103 personas les gusta LazPlanet.)nsert 3ew )tem 'before(.%y popup menu item :. 7rop a +@utton on the form.peration '::( 6ystem 4P) List )teration '<( $onsole 'G( !iles 7irectories 'G( 4lgorithms 'H( 3ews 'H( canvas 'H( 4fter inserting menu items" close the %enu /&itor win&ow to get back to your form. 1ou can change its property" for example" $aption property to something like .( /xplanation ':3( 6creen 8raphics !orm $ontrols ':F( %ath 7ates +ext . &ifferent things.( ► .3 ways to use Popup Menus in Lazarus | LazPlanet http://lazplanet.. 6et its Popup%enu property to the +Popup%enu from the &rop&own menu.bject )nspector.. Adding new item to the menu )f you want more item's( to be a&&e& then the &efault single item" then obviously you nee& to a&& more menu items. (. )f you click it" you can see many customi ing menu options.t% . Button: TMouseButton..5:(Button3.6e"t. : 3ow run the project an& click on the button. / 0 11 11 12 procedure TForm1. 7rop another +@utton component in the form 'suppose it is name& @uttonF(.t2.Menu1.-.u.blogspot. . Way 3: 'howing menu on Le(t Cli ) ((i*ed position! +his is also another use.PopUp shows the menu. begin if Button ( mb)!* t then +o.7:(Button3.u. end.Button323!c4(Sender: TObject'.3 ways to use Popup Menus in Lazarus | LazPlanet http://lazplanet. end..n%ouse7own event '.n its .. +he +Popup%enu.Button2MouseDown(Sender: TObject. S !"t: TS !"tSt#te.To.t2: T+o!nt.8Button3. . begin . Way &: Using ode to show the popup menu Using the Popup%enu property to show the popup menu is just simple an& proper for almost all uses. $% &: Integer'. var . We can create such a menu with the co&e belowB !irst" &rop a +@utton 'suppose it is name& @utton3( an& then &ouble click it an& enterB 1 2 3 4 5 6 .bject inspector*0 /vents*0 . +hen using this metho& is a goo& i&ea. )t automatically shows the menu at the position of the mouse pointer.5% . ► 4pril '::( ► %arch '::( 3ow run the project '!? or >un*0 >un( an& right click on the button to see the popup menu. 3ow run the project '!? or >un*0 >un( an& right click the button an& you will see the popup menu. . +o.-. !or example" there are many antivirus programs which have an .. .t2:(23!entToScreen(.m. )t is seen in many U) &esigns.Menu1. 6ometimes you may want to &o some custom co&ing before showing the popup menu.t'.com/2013/08/3-ways-to-use-popup-menus-in-.t. button.ptions.7'.+o. 1ou will see the menu to appear at the 3 de 5 24/10/2013 11:06 p.t2.9e!* t.n%ouse7own( enter the following co&eB 1 2 3 4 5 6 : procedure TForm1.+o.t. 9ow &i& we &o itJ With the PopUp'x" y( syntax.. 9ow to get $omputer >unning +ime 9ow to create an airbrush tool for ..m. 8reat WorkDD 8reetings from @ra il B7 4ugust :H" F.< P% LabelsB 4rticles" !orm $ontrols" )nterface" menu" popup" right click" 6ystem 4P)" +utorials Tweet 0 StumbleUpon 1 Like 5 Send & omments: Walter said... 9ow to list the files in a fol&er I..) really like the way that you &ivi&e your posts in sections" very simple an& easy to rea&. +he PopUp proce&ure shoul&2ve shown the menu at the mouse pointer" not the bottom of the button. bottom of the button. 9i Walter. 3 ways to use popup menus in La arus form &esigner. 9ow to get 7rag an& 7rop files on y.. +ownload 'ample Code .blogspot.:3 at :FB=H P% Adnan 'hameem said.. . Yo u m i g h t a l s o l i k e 9ow to show +ool+ip" @alloon +ip an.ttK3PFlG1/5 6i eB G3H 5@ +he package contains compile& executable /A/.-P 1ou can &ownloa& the above example tutorial project source co&e from hereB httpBKK&b. 4 de 5 24/10/2013 11:06 p. Poste& by 4&nan 6hameem at :B. 9i" ) fin& your site while searching for the $astle 8ame /ngine for La arus.... 1ou can show the menu at any place on the screen you wish at any time with this syntax.3 ways to use Popup Menus in Lazarus | LazPlanet http://lazplanet.... +here you have it..com/2013/08/3-ways-to-use-popup-menus-in-. . +hanks for visiting La Planet. P% Post a $omment 6ubscribe toB Post $omments '4tom( 5 de 5 24/10/2013 11:06 p.com/2013/08/3-ways-to-use-popup-menus-in-. 5eep visiting La Planet for more articles.:3 at HBH. 3ice to see a @ra ilian fanD 9appy co&ing..3 ways to use Popup Menus in Lazarus | LazPlanet http://lazplanet.m. 4ugust :G" F. . Plus" you are welcome to like our facebook page. )f you are having any questions for a project of yours" you can ask it in the facebook page.blogspot.
Copyright © 2024 DOKUMEN.SITE Inc.