EhLib.Com
https://forum.ehlib.com/en/

Problem with PickList Combobox with Large Scala.
https://forum.ehlib.com/en/viewtopic.php?f=5&t=994
Page 1 of 1

Author:  Luciano_F [ 03 Sep 2019, 20:50 ]
Post subject:  Problem with PickList Combobox with Large Scala.

1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?


2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Code:
if IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

like this

if //IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

in the method
procedure TCustomDBGridEh.DrawColumnDataCellMainContent(


Would it be possible to implement this code Up in the Class Below that you passed me ?

Code:
{ TLFColumn }
Type
TLFColumn = Class(TDBGridColumnEh)
Private
  FExpanded: Boolean;
published
  property Expanded: Boolean read FExpanded write FExpanded;
end;

{ TLFDBGridColumnsEh }
TLFDBGridColumnsEh = class(TDBGridColumnsEh)
private
  function GetColumn(Index: Integer): TLFColumn;
  procedure SetColumn(Index: Integer; const Value: TLFColumn);
public
  property Items[Index: Integer]: TLFColumn read GetColumn write SetColumn; default;
end;

{ TLFDBGridEh }
TDBGrid = class(DBGridEh.TDBGridEh)
private
  function GetColumns: TLFDBGridColumnsEh;
  procedure SetColumns(const Value: TLFDBGridColumnsEh);
protected
  function CreateAxisBars: TGridAxisBarsEh; override;
public
published
  property Columns: TLFDBGridColumnsEh read GetColumns write SetColumns;
end;

{ TLFDBGridEh }

function TDBGrid.CreateAxisBars: TGridAxisBarsEh;
begin
Result := TLFDBGridColumnsEh.Create(Self, TLFColumn);
end;

function TDBGrid.GetColumns: TLFDBGridColumnsEh;
begin
Result := TLFDBGridColumnsEh(inherited Columns);
end;

procedure TDBGrid.SetColumns(const Value: TLFDBGridColumnsEh);
begin
inherited Columns := Value;
end;

{ TLFDBGridColumnsEh }

function TLFDBGridColumnsEh.GetColumn(Index: Integer): TLFColumn;
begin
Result := TLFColumn(inherited Items[Index]);
end;

procedure TLFDBGridColumnsEh.SetColumn(Index: Integer; const Value: TLFColumn);
begin
inherited Items[Index] := Value;
end;

Or it could be to create a new property to control this action so that we can choose if we want to leave the color while focusing on the Grid.


3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?

Attachments:
Scaled PickList.zip [31.68 KiB]
Downloaded 110 times

Author:  danieldavila [ 05 Sep 2019, 13:30 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.
Luciano_F wrote:
1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?


2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Code:
if IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

like this

if //IsSearchingState and
      ( (Selection.SelectionType = gstNon) or
        ( (Selection.SelectionType <> gstNon) {and (gdSelected in ColCellParamsEh.State)} )
      ) then

in the method
procedure TCustomDBGridEh.DrawColumnDataCellMainContent(


Would it be possible to implement this code Up in the Class Below that you passed me ?

Code:
{ TLFColumn }
Type
TLFColumn = Class(TDBGridColumnEh)
Private
  FExpanded: Boolean;
published
  property Expanded: Boolean read FExpanded write FExpanded;
end;

{ TLFDBGridColumnsEh }
TLFDBGridColumnsEh = class(TDBGridColumnsEh)
private
  function GetColumn(Index: Integer): TLFColumn;
  procedure SetColumn(Index: Integer; const Value: TLFColumn);
public
  property Items[Index: Integer]: TLFColumn read GetColumn write SetColumn; default;
end;

{ TLFDBGridEh }
TDBGrid = class(DBGridEh.TDBGridEh)
private
  function GetColumns: TLFDBGridColumnsEh;
  procedure SetColumns(const Value: TLFDBGridColumnsEh);
protected
  function CreateAxisBars: TGridAxisBarsEh; override;
public
published
  property Columns: TLFDBGridColumnsEh read GetColumns write SetColumns;
end;

{ TLFDBGridEh }

function TDBGrid.CreateAxisBars: TGridAxisBarsEh;
begin
Result := TLFDBGridColumnsEh.Create(Self, TLFColumn);
end;

function TDBGrid.GetColumns: TLFDBGridColumnsEh;
begin
Result := TLFDBGridColumnsEh(inherited Columns);
end;

procedure TDBGrid.SetColumns(const Value: TLFDBGridColumnsEh);
begin
inherited Columns := Value;
end;

{ TLFDBGridColumnsEh }

function TLFDBGridColumnsEh.GetColumn(Index: Integer): TLFColumn;
begin
Result := TLFColumn(inherited Items[Index]);
end;

procedure TLFDBGridColumnsEh.SetColumn(Index: Integer; const Value: TLFColumn);
begin
inherited Items[Index] := Value;
end;

Or it could be to create a new property to control this action so that we can choose if we want to leave the color while focusing on the Grid.


3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?

Author:  Luciano_F [ 05 Sep 2019, 14:09 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?

Author:  EhLibSupport [ 05 Sep 2019, 15:44 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

Hello

Quote:
1º When I change the Scala of a form if I have Data in "PickList" when opening combobox the height cuts the letters, see this attached project, how do I solve it ?

We will fix it at the next build.
Thank you for information.

Quote:
2º how could I do to put this code in Class
so you don't have to keep changing fonts every time you get a new version of yourself.

Unfortunately, you cannot add this to the inherited class.
There are not virtual method in the base class to define if text should be Highlighted.
We will add such a method in the next version of EhLib.


Quote:
3º How could I display the holidays of the year by painting the day and show through a Hint in the "TPlannerCalendarPickerEh" component this way when the user puts the "mouse" on a holiday day so a description of the holiday can be shown ?

Unfortunately, this feature is not provided.
We will consider possibly adding hint display events for cells in TPlannerCalendarPickerEh to the next version of the library.

Quote:
4º How to put scrollbar in "TDBVertGridEh" to show too many records because I can only show one record and need to show multiple records I don't know which property enables scrollbar to display next ?

Unfortunately, TDBVertGridEh does not support displaying multiple records vertically.

Author:  danieldavila [ 06 Sep 2019, 11:45 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

Luciano_F wrote:
Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?


Eu até criei um tópico sobre, mas nunca responderam.

Author:  Luciano_F [ 06 Sep 2019, 12:25 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

danieldavila wrote:
Luciano_F wrote:
Quote:
Luciano, você teve problemas com os calendários na Grid? Por que aqui ficou com os dias fora de lugar em alguns meses e eu tive que ajustar manualmente no fonte. O calendário deles começa com os dias da semana: SegTerQuaQuiSexSabDom e o nosso calendário brasileiro começa DomSegTerQuaQuiSexSab, aí no calendario da EhLib mostrava que por exemplo Julho começou em uma terça-feira mas no calendário correto foi em uma segunda-feira.


Eu não tive problema com os Calendários aqui ficou certinho.
você passou essa correção para o autor ?


Eu até criei um tópico sobre, mas nunca responderam.


Peque o link do tópico e mande como pergunta ao Suporte do EhLib, se o colega tem uma licença ativa ele deve responder.

eu sempre faço isso ele tem me respondido, ele demora mais responde e inclusive agradece quando é um bug, porém você tem montar um projeto onde demostra o Bug.

Eu já apresentei alguns problemas para ele porém demostrei o problema e fui atendido inclusive a busca com o "SearchPanel" era lenta em relação ao XdbGrid que é um componente concorrente e ele melhorou muito a busca depois de ver o comparativo que inclusive eu demostrei por vídeo.


Aproveitando seu topico "http://forum.ehlib.com/en/viewtopic.php?f=5&t=985"
sobre os caracteres com acento eu não consegui usar

Code:
unit Unit1;
...
function MakeStringRoughEh(s: String): String;
begin
Result := StringReplace(s, 'ê', 'e', [rfReplaceAll]);
end;
....

initialization
  DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh;
end.


O colega poderia colocar como fez detalhado para mim.
Grato.

Author:  danieldavila [ 09 Sep 2019, 12:26 ]
Post subject:  Re: Problem with PickList Combobox with Large Scala.

Eu fiz exatamente como eles explicaram no tópico e criei as procedures com os mesmos nomes.
Mas essa parte
initialization
DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh;
end.
eu coloquei o DBUtilsEh.MakeStringRoughProcEh := MakeStringRoughEh; por ultimo no Inicialization;

Criei a function MakeStringRoughEh em outra Unit para organização, mas acredito que vc possa fazer isso dentro da DBGridEh.Pas
E para remover os acentos criei a seguinte function:

Code:
function RemoveAcentos(_Value: string): string;
const
  ComAcento = 'àâêôûãõáéíóúçüñÀÂÄÊÔÛÃÕÁÉÍÓÚÇÜ';
  SemAcento = 'aaeouaoaeioucuNAAAEOUAOAEIOUCU';
var
  X: Integer;
begin
  for X := 1 to Length(_Value) do
    if PosEx(_Value[X], ComAcento) <> 0 then
      _Value[X] := SemAcento[PosEx(_Value[X], ComAcento)];
  Result := _Value;
end;


E a chamada:
Code:
function MakeStringRoughEh(s: String): String;
begin
  Result := RemoveAcentos(S);
end;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/