Recent

Author Topic: RTF ability  (Read 6311 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14157
  • Probably until I exterminate Putin.
Re: RTF ability
« Reply #15 on: May 22, 2018, 04:41:28 pm »
I contacted MS and they are currently scanning *and removing* or replacing self-extracting files left-overs from the olden days. Given the size of the organization and their infra-structure that can take some time. (hours, days, not months). But they do what they are told. 8-) (Big finger, D.T.)

And a great compliment to Microsoft for taking immediate action.
« Last Edit: May 22, 2018, 04:57:12 pm by Thaddy »
Specialize a type, not a var.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: RTF ability
« Reply #16 on: May 23, 2018, 12:52:01 am »
Chris, I have not looked extensivly at TK's demos can no good answer.
Instead, I built my menus (etc) from normal Lazarus components, reasonably clean approach.
Have a look at  my project, https://github.com/tomboy-notes/tomboy-ng
In the "editbox" unit, you will see the KMemo used in this way. There are popup menus but no main menu, however, it would work fine if you added one.
Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: RTF ability
« Reply #17 on: May 23, 2018, 01:23:40 am »
How would I add say another Menu to it? I did try creating a Menu on the form, and use:

Menu := FFrame.MainMenu + MenuItem1;
No, there is no operator to "add" two menus. You must iterate through the items of the menu which you want to add, create a new menu item in the destination menu for each item to be added and copy the properties.

Here is a small example: the form contains a standard "File" / "Edit" / "Options" MainMenu and a memo which has a popup menu. The code provided copies the popupmenu to the item "Edit" of the MainMenu.

katronix

  • Jr. Member
  • **
  • Posts: 54
Re: RTF ability
« Reply #18 on: May 23, 2018, 03:14:01 am »

No, there is no operator to "add" two menus. You must iterate through the items of the menu which you want to add, create a new menu item in the destination menu for each item to be added and copy the properties.

Here is a small example: the form contains a standard "File" / "Edit" / "Options" MainMenu and a memo which has a popup menu. The code provided copies the popupmenu to the item "Edit" of the MainMenu.

Can you expand upon your answer WP? Say I just wanted to add a Help menu with an About option? Or do I just need to modify the original file?

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: RTF ability
« Reply #19 on: May 23, 2018, 03:21:11 am »
Have you downloaded and tried the code wp provided?

katronix

  • Jr. Member
  • **
  • Posts: 54
Re: RTF ability
« Reply #20 on: May 23, 2018, 08:01:34 am »
Have you downloaded and tried the code wp provided?

Thanks for pointing it out Handoko, I hadn't realized he had included code.

 

TinyPortal © 2005-2018