Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/14/19 in all areas

  1. Alexander Sviridenkov

    Context menu UI built with HTML and CSS only

    Code for each item is relatively simple. For example list type selector consists of two classes, first for drop down panel: THtEditContextList = class(THtEditContextItem) public function Render: string; override; end; function THtEditContextList.Render: string; procedure Add(const ListType, ListTag: string); begin Result := Result + Format('<div class="eclistbox fade" listtype="%s"><%s style="list-style-type: %s"><li>———</li><li>———</li><li>———</li></ol></div>', [ListType, ListTag, ListType]); end; begin Result := ''; Add('none', 'ul'); Add('circle', 'ul'); Add('disc', 'ul'); Add('square', 'ul'); Add('decimal', 'ol'); Add('lower-alpha', 'ol'); Add('lower-roman', 'ol'); Add('upper-alpha', 'ol'); Add('upper-roman', 'ol'); end; And second for the button: THtEditContextListStyle = class(THtEditContextLiveItem) public function Render: string; override; procedure OnSubmenuElementEnter(Sender: TElement); override; procedure OnSubmenuClick(const Sender: TElement; Button: TMouseButton; Shift: TShiftState); override; end; procedure THtEditContextListStyle.OnSubmenuClick(const Sender: TElement; Button: TMouseButton; Shift: TShiftState); begin OnSubmenuElementEnter(Sender); end; procedure THtEditContextListStyle.OnSubmenuElementEnter(Sender: TElement); begin if Sender['listtype'] <> '' then begin if Sender.NodebyName('ol') <> nil then Editor.SetListStyle('ol', Sender['listtype']) else Editor.SetListStyle('ul', Sender['listtype']); Editor.Repaint; end; end; function THtEditContextListStyle.Render: string; begin id := 'list'; Result := '<div id="list" class="ecbutton down fade"><div class="faicon">&#61643;</div>&nbsp;</div>'; FSubmenuClass := THtEditContextList; FDefaultSubmenuWidth := 300; end; Code for building menu: ContextPanel.Add(THtEditContexBold).Add(THtEditContextItalic).Add(THtEditContextUnderline). Add(THtEditContexStrike).Add(THtEditContexSpace).Add(THtEditContextTextColor).Add(THtEditContextBGColor). Add(THtEditContextFontSize).Add(THtEditContextFont). Add(THtEditContexLineBreak).Add(THtEditContexAlignLeft).Add(THtEditContexAlignCenter).Add(THtEditContexAlignRight).Add(THtEditContexAlignFull)...
  2. Attila Kovacs

    SFTP client

    Reading your question I don't really know what you need, but with https://www.clevercomponents.com/products/inetsuite/ I could cover all my needs in the past. There is also a discount right now.
  3. WillH

    SFTP client

    Indy does not support SSH. I use securebridge which is great for SSH and SFTP. Not free though. https://www.devart.com/sbridge/
  4. This really should be fixed! Debugging this code structure will be more common as soon as 10.4 will fix inline declaration or when LSP will be released. procedure TTest.Test; begin if SomeCondition then begin var Qry := 'select * from sometable'; Check(Qry); // Breakpoint: S shows 'A' - Output in check = 'A' end; {..} if SomeOtherCondition then begin var Qry := 'select * from sometable where condition'; Check(Qry); // Breakpoint: S shows 'A' - should have been 'C' - Output in check = 'C' end; {..} while SomeCondition do begin var Qry := SomeFunction( SomeParameter ); Check(Qry); end; end; I'm not saying this construction is good or not, but if the new feature allows it, should work as advertised! Don't have much hair left to pull out.
  5. Anders Melander

    Drag and Drop Component Suite + Drop to Outlook not working

    Try diagnosing the problem with the attached utility: Drag from the Drop Source pane and drop onto Outlook. You should be able to see what data Outlook asks for. If you compare the sequence when dropping on a 32-bit Outlook to that of a 64-bit, then maybe it becomes clear what's going on. DragDropTracer.zip
  6. Attila Kovacs

    Dark theme

    https://darkreader.org/
×