Jump to content

Vandrovnik

Members
  • Content Count

    71
  • Joined

  • Last visited

  • Days Won

    1

Vandrovnik last won the day on October 31 2019

Vandrovnik had the most liked content!

Community Reputation

11 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Vandrovnik

    Why upgrade?

    When you are up-to-date with Delphi, it is easier to accomodate the software to new demands (such as was UTF or HDPI in the past, may be 64 bit in the future - hard to say how many years 32bit apps will be supported, new encryptions etc). Move software to another language will cost a lot of money and time (and new bugs and old features missing in the beginning).
  2. Vandrovnik

    tStringGrid.OnDrawColumnCell - hot to get column field name?

    Thank you for helping me to get the right way!
  3. Vandrovnik

    tStringGrid.OnDrawColumnCell - hot to get column field name?

    So, partial solution... Works with field names (does not depend on headers), works when columns are moved. Works, when data is reloaded from database. But does not keep column width, when user changes the width in runtime (I did not find any event for column width change). // defined as private member in form: grZasobaLink: TLinkGridToDataSource; // I do not know how to obtain BindingsList directly from the StringGrid, so I am passing it as param function GetLinkToDataSource(aBindingsList: tBindingsList; aGrid: tStringGrid): TLinkGridToDataSource; var a: integer; BindComponent: tContainedBindComponent; begin result:=nil; if (aBindingsList=nil)or(aGrid=nil) then exit; for a:=0 to aBindingsList.BindCompCount-1 do begin BindComponent:=aBindingsList.BindComps[a]; if (BindComponent.ControlComponent=aGrid)and(BindComponent is tLinkGridToDatasource) then begin result:=tLinkGridToDatasource(BindComponent); exit; end; end; end; // keep the link, since I will need it often procedure TZasobaForm.FormCreate(Sender: TObject); ... grZasobaLink:=GetLinkToDataSource(BindingsList1, grZasoba); end; procedure TZasobaForm.grZasobaDrawColumnCell(Sender: TObject; const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF; const Row: Integer; const Value: TValue; const State: TGridDrawStates); var FieldName: string; begin Canvas.Font.Size:=grZasoba.TextSettings.Font.Size; if Assigned(grZasobaLink) then FieldName:=UpperCase(grZasobaLink.Columns[Column.Index].MemberName) // Field name! :-) else FieldName:=''; if (FieldName='FYZICKA') then begin Canvas.Font.Style:=[tFontStyle.fsBold]; end; Canvas.Fill.Color:=TAlphaColorRec.Black; Canvas.FillText(Bounds, (Value.AsString), false, 1, [], TTextAlign.Leading, TTextAlign.Center); end; // handle column move procedure TZasobaForm.grZasobaColumnMoved(Column: TColumn; FromIndex, ToIndex: Integer); begin if Assigned(grZasobaLink) then grZasobaLink.Columns[FromIndex].Index:=ToIndex; end;
  4. Vandrovnik

    tStringGrid.OnDrawColumnCell - hot to get column field name?

    I suppose this information already is stored somewhere, so I would like to find it and use it. I cannot rely on the header, but of course I could use tag, build my own list or something like that. It seems that this connection between tStringGrid and data is also partly broken - well, in runtime I can move columns and set their width with mouse, but when the grid is filled again, order and width of columns are lost (this happens in my case when user selects another master record - data for details in the grid has to reload from database, columns where supposed to keep their position and width).
  5. I know, but from these graphs it is still pretty well visible, that issues stay in the queue/stack/whatever longer and longer and that new issues come faster then old issues are resolved. 800 days and increasing, that is a terrible value. I understand they they want to keep up to date with new Android, new iOS etc., but still I believe that they should have a team, which will resolve reported bugs.
  6. I know... And bugs resolved as "will not repair" (ie Translation Manager), bugs marked as duplicate... But the tendency in the graph is the same as my internal feeling in last years.
  7. Yeeees, that is exactly what I was searching for! Nice graphs (with sad data in it). Please can you tell me how to get these graphs from quality.embarcadero.com?
  8. Well, I tried - but when I use (the top one) Export - Excel (all fields), it exports only 1000 issues of more then 16000... May be there is a better way and I just do not see it.
  9. May be Embarcadero could explain how they decide what to do and what to postpone... and postpone...? Because when I compare Embarcadero with TMS or Fastreport (or you), it is often reaction several years vs. several days, which I really do not like. Even https://quality.embarcadero.com/browse/RSP-24548, which should take +- 2 minutes to repair, will probably be there open for years. And please do not argument that it will take much more time because of testing, because the "testing" I can see each day in Object Inspector, which is not showing last letters in text (reported more than a year ago, but did they notice by themselves when testing?), and in Projects (which stops to show its content in 10.3.3 sometimes), and in Toolbars, which are moved randomly each day... I would like to see a statistic, how reported and solved issues develop over years. May be it is somewhere on the web, I do not know.
  10. Vandrovnik

    tStringGrid.OnDrawColumnCell - hot to get column field name?

    Thank you for the answer, but tColumn.Header contains DisplayLabel of the field (which will change with translations to other languages, so I cannot depend on it). There must be the field name, somewhere 🙂
  11. Vandrovnik

    javascript errors from IDE ?

    Well, you can try to disable Start page and you will see... If it does not help, you can enable it again (remove the underscore). On my PCs, disabling Start page removed these annoying messages about script errors.
  12. Vandrovnik

    javascript errors from IDE ?

    Start page? I make this change in registry after installation (add "_" before "Start"): HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Known IDE Packages $(BDS)\Bin\startpageide260.bpl = _Start Page IDE Package
  13. Hello, I have a tStringGrid linked to tIBQuery. In tStringGrid.OnDrawColumnCell, I would like to change font color or style in dependence of data in that column. Now I am able to do something like this: procedure TZasobaForm.grZasobaDrawColumnCell(Sender: TObject; const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF; const Row: Integer; const Value: TValue; const State: TGridDrawStates); begin Canvas.Font.Size:=grZasoba.TextSettings.Font.Size; if (Column<>nil)and(Column.Index=1) then begin Canvas.Font.Style:=[tFontStyle.fsBold]; end; Canvas.Fill.Color:=TAlphaColorRec.Black; Canvas.FillText(Bounds, (Value.AsString), false, 1, [], TTextAlign.taLeading, TTextAlign.taCenter); end; But instead of using if Column.Index=..., I would like to use something like if Column.DataField='PRICE'... How can I obtain field name for the Column? Columns can be moved on runtime, so I cannot expect that Price is always second column in the grid. In .fmx, there is: object grZasoba: TStringGrid Align = Client CanFocus = True ClipChildren = True Size.Width = 391.000000000000000000 Size.Height = 208.000000000000000000 Size.PlatformDefault = False TextSettings.Trimming = None StyledSettings = [Family, Style, FontColor] TabOrder = 1 RowCount = 0 Options = [ColumnResize, ColumnMove, ColLines, RowLines, RowSelect, AlwaysShowSelection, Tabs, Header, HeaderClick] DefaultDrawing = False OnDrawColumnCell = grZasobaDrawColumnCell Viewport.Width = 387.000000000000000000 Viewport.Height = 183.000000000000000000 end object BindSourceZasoba: TBindSourceDB DataSet = qZasoba ScopeMappings = <> Left = 88 Top = 240 end object BindingsList1: TBindingsList Methods = <> OutputConverters = <> Left = 20 Top = 5 object LinkGridToDataSourceBindSourceDB12: TLinkGridToDataSource Category = 'Quick Bindings' DataSource = BindSourceZasoba GridControl = grZasoba Columns = < item MemberName = 'PRICE' Width = 40 end ... Kind regards, Karel
  14. Vandrovnik

    Combining bitmaps and preserving antialiased text quality...

    uses Direct2D; procedure TMainForm.PaintBox1Paint(Sender: TObject); var D2Canvas: TDirect2DCanvas; begin D2Canvas:=TDirect2DCanvas.Create(PaintBox1.Canvas, PaintBox1.ClientRect); try D2Canvas.BeginDraw; try D2Canvas.Brush.Style:=bsSolid; D2Canvas.Brush.Color:=clFuchsia; D2Canvas.FillRect(PaintBox1.ClientRect); D2Canvas.Font.Size:=32; D2Canvas.Font.Color:=clBlack; D2Canvas.TextOut(100, 100, 'Delphi 25th'); finally D2Canvas.EndDraw; end; finally FreeAndNil(D2Canvas); end; end; This is not OK?
  15. Vandrovnik

    Combining bitmaps and preserving antialiased text quality...

    Hello, as David already wrote - just render the text on the map, there is no need to render it to a bitmap and then merge bitmaps. Do you need to print the result? Because that was a pain with Direct2D and Delphi 😕
×