Jump to content

tristan

Members
  • Content Count

    5
  • Joined

  • Last visited

  • Days Won

    1

tristan last won the day on July 15 2019

tristan had the most liked content!

About tristan

  • Rank

Contact Methods

  • Website URL
    www.littleearthsolutions.net

Profile Information

  • Gender
    Male
  • Location
    Australia

Smart Mobile Studio

  • Edition
    Professional
  1. Hi, Thanks for all the effort in making Smart Mobile Studio a powerful tool for pascal web development. After having a license for over a year I am finally making some effort at building a real life application. I just want to provide some feedback; I did try a quick search in the forum to avoid duplication. I believe I am testing the latest development version; however I do find it difficult to know with any certainty. Versioning Release notes in SmartUpdate have incorrect date (I think). Can you make it easier to identify the version available? SmartUpdate fails with DEVELOPMENT not available unless re-run with /changechannel /showhidden parameters IDE Import existing form. I could not find an intuitive way to import a form created from another project. Copy form into new project folder, add external, not added to Form section Switch comment (CTRL + /) will not include the last line selected Controls TabControl AnimateTabs with Forms in tabs, will cause form contents to disappear (in particular memo and stringrids) (See TabForms demo with TMemo on form3) Turning off AnimateTabs will resolve the issue. TabForms.zip
  2. For anyone needing something similar unit SmartCL.Controls.StringGrid.ImageColumn; interface uses W3C.DOM, System.Types, System.Types.Graphics, System.Types.Convert, System.Time, System.Dictionaries, SmartCL.Application, SmartCL.Components, SmartCL.System, SmartCL.Theme, SmartCL.Css.Classes, SmartCL.Scroll, SmartCL.Controls.Label, SmartCL.Controls.StringGrid, SmartCL.Controls.Image; type TW3StringGridImageColumn = class(TW3StringGridColumn) protected function GetClasses: String; override; public constructor Create; override; function GenerateHtml(GridLine: TW3RenderedGridLine; ColumnIndex, CurrentLeft: Integer): String; override; procedure SetColumnEvents(Sender: TW3CustomStringGrid; GridLine: TW3RenderedGridLine; ColumnIndex: Integer); override; end; implementation constructor TW3StringGridImageColumn.Create; begin FBaseClass := 'TW3Image'; AlignText := taCenter; VAlign := tvCenter; BorderType := btLightBorderRight; BackgroundType := bsNone; end; function TW3StringGridImageColumn.GenerateHtml(GridLine: TW3RenderedGridLine; ColumnIndex, CurrentLeft: Integer): String; begin var ItemId:=Grid.Handle.id+'_row_'+IntToStr(GridLine.DataIndex)+'_btncol_'+IntToStr(ColumnIndex); GridLine.ItemIds.Add(ItemId); result:='<img id="'+ItemId+'" class="'+GetClasses+'" style="visibility: visible; display: inline-block; overflow: hidden; left: '+IntToStr(CurrentLeft)+'px; position: absolute; width: '+IntToStr(Width)+'px; height: 100%;border-radius: 0px;" src="'+TString.EncodeTags(Grid.Cells[GridLine.DataIndex,ColumnIndex])+'"</img>'; end; function TW3StringGridImageColumn.GetClasses: String; begin result:=inherited GetClasses+' TW3ButtonBackground'; end; procedure TW3StringGridImageColumn.SetColumnEvents(Sender: TW3CustomStringGrid; GridLine: TW3RenderedGridLine; ColumnIndex: Integer); // Note: This is used by the combo box too var cHandle: THandle; begin try cHandle := GridLine.FixedCols.Handle.GetChildById(GridLine.ItemIds[ColumnIndex]); if not (cHandle) then cHandle := GridLine.ScrollableCols.Handle.GetChildById(GridLine.ItemIds[ColumnIndex]); // cHandle['oninput'] := @Sender.HandleDataChanged; except end; end; end.
  3. @IElite Thanks for that very helpful reply.
  4. Hi, Is it possible to add an image to a cell?
×
×
  • Create New...