Jump to content


didiergm's Content

There have been 31 items by didiergm (Search limited from 21-April 23)


By content type

See this member's


Sort by                Order  

#16231 Installation issues for XE2 on Win7 - howto get it to setup

Posted by didiergm on 16 November 2011 - 09:58 AM in General Discussion

Hello Boki,

Just to let you know that using the .exe installer downloaded yesterday on a fresh XE2 install I had the following issues (nothing major, but required some tweaking)

1- Paths not set : I had to manually add a path to
c:\program files\berg\next Suite\Sources
and all subdirectories


2-Missing res file: NxCollectionRun_xe2.res - I made a copy of NxCollectionDsgn_xe2.res

3- Still had this error
Please open dproj file of NxAddonsRun_xe2 with a Notepad and delete this string (with using search).
so I did what you suggested back in october:
Please open dproj file of NxAddonsRun_xe2 with a Notepad and delete this string (with using search).

Hope this can be fixed in the future and help someone in the meantime

Didier



#15635 Individual RowHeight not stored ?

Posted by didiergm on 25 May 2011 - 04:45 PM in NextGrid Component

Boki,

I am trying to reimplement what you advised me to use a while back using the current dbgrid sources and it looks like the onChangeRowheight never gets called. I cannot actually run the demo because I do not have the bds installed.

am I doing solmething stupid ?






#15441 tnxheaderpanel

Posted by didiergm on 19 March 2011 - 09:09 PM in Next Collection

Good evening Boki,

Would you consider making the function GetButtonRect public for tnxHeaderPanel (like in tnxExpnadPanel)) this allows some neat use of a tnxheaderPanel. I am using it as a container for a whole form, thus having a nice caption and using the collapse button as a close button; this work well unless the window is modal, in which case, I need to be able to drag using the mousedown on the header and still use the collapse button like this:

procedure TTaskHistory.NxHeaderPanel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
var
h: tnxHeaderPanel;
begin
inherited;
h := Sender as tNxHeaderPanel;
// if I am indeed in the header
if PtInRect(Rect(0, 0, h.ClientWidth, h.HeaderSize), Point(X, Y)) then
begin
// and not on the collapse button
if not PtInRect(h.GetButtonRect, Point(X, Y)) then
begin
ReleaseCapture;
SendMessage(Self.Handle, WM_SYSCOMMAND, SC_MOVE + 2, 0) // WM_SYSCOMMAND, 61458, 0) ;
end;
end;
end;

and in the oncollapse event:
procedure TTaskHistory.NxHeaderPanel1Collapse(Sender: TObject; var Accept: Boolean);
begin
inherited;
if (fsModal in self.FormState) then
begin
self.ModalResult := mrOk;
Self.CloseModal;
end
else
self.Close;
end;

I made GetButtonRect public in my version and could not see any side effects








#15362 Problem with validating input

Posted by didiergm on 25 February 2011 - 12:16 AM in NextDBGrid Component

QUOTE (Boki (Berg) @ Feb 21 2011, 12:19 AM) <{POST_SNAPBACK}>
Hello Didier,

I am having problem with implementing OnEndEditing event. Maybe I will need more time to complete it.

Problem is that when you press Return, inplace editor lose focus, and I have try everything to bring focus back to Inplace Editor, but without luck sad.gif

I may send you a code, and maybe you can help me and may find a solution.

Best regards


Yes, please Boki, If I may help, fell free to send me your code.



#15338 Problem with validating input

Posted by didiergm on 17 February 2011 - 07:18 PM in NextDBGrid Component

I am trying to achieve the following when the user enter a telephone number.

1- Test that the telephone number is valid, (i.e. all digits and the proper length). if the telephone is not valid then I want the original input to stay in the cell (ie not be rejected as in EditAccet event, because the user may have mistyped one digit, and does not want to re-input the whole number)

2- if the number is valid, I want to format it with spaces etc..

3- then it is stored in the field.

I can sort of do 2, but I cannot do 1 as I do not understand how to prevent the focus to change row/column. I can go back to the column, but if the user has clicked on a different row, it is the right column but on a different row

How could I handle this ?

Note that if this cannot be handled in a dbgrid, I am happy to change to a regular grid, but would need some help too.

Didier



#15186 Need to have a tCell.asInt64

Posted by didiergm on 05 February 2011 - 10:13 AM in NextGrid Component

QUOTE (Boki (Berg) @ Feb 4 2011, 02:27 AM) <{POST_SNAPBACK}>
Hello Didier,

I like to say sorry for delay. I was been in my Birth town for day and a half.

I will need to think about it. Why not use a AsFloat for a moment, until I decide. This may be big decision.

Best regards


Don't be sorry, you are allowed to travel smile.gif

the problem with asFloat at the moment is that, if I understand correctly, the underlying property is still an integer ... not an int64, unless I misundestood what you say



#15151 Need to have a tCell.asInt64

Posted by didiergm on 31 January 2011 - 02:59 PM in NextGrid Component

this is what I did to achieve an asInt64


in NxCells.tCell I added the following property



property asInt64: Int64 read GetAsInt64 write SetasInt64;

function GetAsInt64: int64; virtual; abstract;
procedure SetAsInt64(const Value: Int64); virtual;



procedure TCell.SetAsInt64(const Value: Int64);
begin
Changed;
end;


then in nxCellsClasses I added

function GetAsInt64: int64; virtual; override;
procedure SetAsInt64(const Value: Int64); override;



then for tFloatCell (the only cell type which really needs changing, if I understand correctly)

procedure TFloatCell.setAsInt64 (const value: Int64);
begin
fValue := value;
inherited;
end;


function TFloatCell.GetAsInt64: Int64;
begin
Result := Round(FValue);
end;


and for the others cell types, simply

procedure TxxxxCell.setAsInt64 (const value: Int64);
begin
self.setasInteger(integer(value));
end;


function TxxxxCell.GetAsInt64: Int64;
begin
Result := self.getAsInteger;
end;






#15150 Need to have a tCell.asInt64

Posted by didiergm on 31 January 2011 - 02:26 PM in NextGrid Component

I had a look at this and found that


on a tloatcell, it is easy enough to achieve, by adding a getasint64/setasInt64, If I understand correctly this

on a tintegercell, i was originally tempted to change the fvalue datatype from integer to int64, but as i undertand it a tintegercell will only be instantiated if a culumn is an ingage, a reta or a list

Would you consider adding it to the next release, I am happy to send you what I did.

Didier




#15148 Select the parent row

Posted by didiergm on 30 January 2011 - 07:47 PM in NextGrid Component

QUOTE (Boki (Berg) @ Jan 26 2011, 03:07 AM) <{POST_SNAPBACK}>
Hello Didier,

Maybe next method helps:

function GetParent(const Index: Integer): Integer;

if not, I will made a procedure GetRowIndex(TRow)

Best regards

Sorry Boki, I did not see your reply as I was away for a few days.

This function would help, I am just a bit confused between trows and using rows vis indexes.

Didier



#15128 Select the parent row

Posted by didiergm on 24 January 2011 - 05:08 PM in NextGrid Component

Hello,

There is probably a very simple answer but

I have a grid with a tree column. When the user click on a child row, I need to select the parent. I know how to get the parent of a row, but this is of type tRow and I need to get to the index of that row in order to select it. How can I do that ?

thanks in advance

Didier




#15071 TNxHeaderPanel

Posted by didiergm on 06 January 2011 - 12:53 AM in Next Collection

QUOTE (Boki (Berg) @ Jan 5 2011, 01:27 AM) <{POST_SNAPBACK}>
Hello Didier,

I have add OnCollapse event with Accept parameter. I will need to think about adding custom Glyph.

Best regards


Thanks!

Is it possible to get a patch ? or when are you planning a new release ?




#15067 tnxInfoPanel

Posted by didiergm on 04 January 2011 - 12:44 AM in Next Collection

QUOTE (Boki (Berg) @ Jan 4 2011, 12:36 AM) <{POST_SNAPBACK}>
Hello Didier,

I have add it. Thank you. It will be included in next release.

Best regards


great



#15065 tnxInfoPanel

Posted by didiergm on 03 January 2011 - 04:32 PM in Next Collection

It would be nice to have the option (may be using a new wordwrap option - I know this would have a ) to have the ability to use HTML tags, similar to TNxAlertWindow

If you agree I suggest the following changes

1- add ipHtmlText to the InfoPanelOptions

TInfoPanelOptions = set of (ipBorder, ipStaticPanel, ipHtmlText);

2 - change the Paint procedure to include the handling of the HTML text as follows

add the first 3 lines

if ipHtmlText in Options then
ProcessHTML(Canvas, TxtRect, FText, Point(0, 0), nxClasses.Indent(0, 0), True)
else
DrawFmtText(Canvas, TxtRect, FText, FAlignment, FVerticalAlignment, FWrapKind, BiDiMode);


I tried on my local copy and could not see any side effects

Let me know what you think



#15064 TNxHeaderPanel

Posted by didiergm on 02 January 2011 - 12:15 PM in Next Collection

Is it possible to have an event when clicking on the collapse button to prevent the 'normal' collapsing from happening, but use the button as a signal.

Is it possible to change the collapse glyph ?

What I am trying to achieve is to use a tnxheaderPanel as a background for a form, replacing the form caption & border by a tnxheader panel.

Didier



#15062 tnxInfoPanel

Posted by didiergm on 01 January 2011 - 10:03 PM in Next Collection

Boki,

do not waste time, I have found the source of the problem: I was creating the form using the CreateParented Method which sets the ParentWindow property, not the parent property therefore the size of the parent window could not be calculated and all dimensions were wrong.

Sorry for the waste of time

Didier



#15061 tnxInfoPanel

Posted by didiergm on 01 January 2011 - 12:20 PM in Next Collection

QUOTE (Boki (Berg) @ Dec 31 2010, 08:22 PM) <{POST_SNAPBACK}>
Hello Didier,

Can you please send me small demo project (source code) to I test it. I am not able to reproduce bug.

Thanks


I tried, but cannot reproduce it so far on a small application. As so as I manage to reproduce it I'll send you something. This is really annoying as it does not work in my application, but does outside sad.gif


I managed to reproduce it; I am sending you a project. You'll notice this happens when a windows is creted inside another container (here a tnxnotebook)



#15059 tNxTabSheet

Posted by didiergm on 31 December 2010 - 10:31 PM in Next Collection

QUOTE (Boki (Berg) @ Dec 31 2010, 08:46 PM) <{POST_SNAPBACK}>
Update:
....
I have only changed clWindow to Color:

This made a possibility to set a color for gradient instead hardcoding to clWindow.

best regards



Even better!

Regards

Didier



#15055 tnxInfoPanel

Posted by didiergm on 31 December 2010 - 01:47 PM in Next Collection

Place a tnxInfoPanel on a tnxPageControl; align it to top -> set wrapkind to wkwordwrap; type a long text, in IDE the text is properly wrapped, in run time it is not.

Other option; place a tnxInfoPanel into a tnxheaderpanel (even if the thxnheader is on a tnxsheet) set wrapkind to wkwordwrap; type a long text, in IDE the text is properly wrapped, in run time it is fine; now set the tnxheaderpanel align to altop or alclient; in ide the wrapping of tnxInfoPanel is OK, at run time it is not.

Any idea ?



#15054 tNxTabSheet

Posted by didiergm on 31 December 2010 - 11:47 AM in Next Collection

I did a quick experiment with tabsheet background and applied the same changes to tnxTabSheet that what we just did for tnxHeaderpanel:

1- Create a new variable FPageStyle (to be consistent with the other fPagexxxxx)
2- create a property PageStyle:
property PageStyle: TNxPanelStyle read FPageStyle write SetPageStyle default ptDefault;
3- Create a setter procedure
procedure TNxTabSheet.SetPageStyle(const Value: TNxPanelStyle);
begin
FPageStyle := Value;
Invalidate;
end;

4- modify the paint procedure as follows

comment out the following two lines
// Brush.Color := Self.Color;
// FillRect(ClientRect);
and replace them with (taken out of tnxheader.drawBackground)

case FPageStyle of
ptDefault:
with Canvas do
begin
Brush.Color := Self.Color;
FillRect(ClientRect);
end;
ptGradient:
begin
SecondColor := SchemeColor(seBtnFace);
DrawVertGradient(Canvas, ClientRect, clWindow, SecondColor);
end;
ptInverseGradient:
begin
SecondColor := SchemeColor(seBtnFace);
DrawVertGradient(Canvas, ClientRect, SecondColor, clWindow);
end;
end;


et voilĂ , a nice nxPage with gradient capabilities; using the current scheme color. It saves, in my case the need to have a nxheaderpanel on each page to achieve this effect and should not cause any compatibilities issues for exisitng users.

Please tell me if you accept this change.



#15052 tNxHeaderPanel

Posted by didiergm on 31 December 2010 - 02:38 AM in Next Collection

QUOTE (Boki (Berg) @ Dec 31 2010, 02:26 AM) <{POST_SNAPBACK}>
Hello Didier,

Please try to replace next procedure:

CODE
procedure TNxHeaderPanel.DrawBackground(ARect: TRect);
var
  SecondColor: TColor;
begin
  case FPanelStyle of
    ptDefault:
      with Canvas do
      begin
        Brush.Color := Self.Color;
        FillRect(ARect);
      end;
    ptGradient:
      begin
        SecondColor := SchemeColor(seBtnFace);
        DrawVertGradient(Canvas, ARect, clWindow, SecondColor);
      end;
    ptInverseGradient:
      begin
        SecondColor := SchemeColor(seBtnFace);
        DrawVertGradient(Canvas, ARect, SecondColor, clWindow);
      end;
  end;
end;



This seems to work fine. thanks

If I don't speak to you before, have a great New Year's eve and a fantastic 2011

Didier



#15049 tNxHeaderPanel

Posted by didiergm on 31 December 2010 - 01:38 AM in Next Collection

QUOTE (Boki (Berg) @ Dec 31 2010, 01:26 AM) <{POST_SNAPBACK}>
Hello Didier,

What do you think about adding PanelColor property for controling second color (clBtnFace)?

Best regards



This would probably be even better but more work. On the other hand, I'd like to see the ColorScheme being more widely used. so if possible, add a new entry to the colorScheme array for a panelcolor;

talking of which do you have pans to add colorscheme support to your grid ? maybe in the form of an event ?



#15047 tNxHeaderPanel

Posted by didiergm on 31 December 2010 - 12:51 AM in Next Collection

Whatever color scheme is used, the background gradient is always painted in clBtnFace color;

May I suggest the following change ?


procedure TNxHeaderPanel.DrawBackground(ARect: TRect);
begin
case FPanelStyle of
ptDefault:
with Canvas do
begin
Brush.Color := Self.Color;
FillRect(ARect);
end;
// ptGradient: DrawVertGradient(Canvas, ARect, clWindow, clBtnFace);
// ptInverseGradient: DrawVertGradient(Canvas, ARect, clBtnFace, clWindow);
ptGradient: DrawVertGradient(Canvas, ARect, clWindow, SchemeColor(seBtnFace, FColorScheme));
ptInverseGradient: DrawVertGradient(Canvas, ARect, SchemeColor(seBtnFace, FColorScheme), clWindow);
end;
end;

this way the gradient color follows the current scheme;

alternatively it could use the color to be consistent with the Default panel style.

Best regards

Didier



#15045 nxButton

Posted by didiergm on 31 December 2010 - 12:40 AM in Next Collection

QUOTE (Boki (Berg) @ Dec 31 2010, 12:20 AM) <{POST_SNAPBACK}>
Hello Didier,

Unfortunately, this is how is designed. But, if you resize button you will notice that glyph and text are both centered.

Best regards


Ok, I understand, I still think that there is something slightly wrong with the glyphspacing; especially when you add the arrow. when I get a chance, I'll have a play with the paint procedure and may be submit a patch for your approval.



#15043 nxButton

Posted by didiergm on 30 December 2010 - 09:27 PM in Next Collection

Boki,

Although this works this does not work well as the glyph is way too indented so if you have a fairly long caption and use glyphspacing, the text is pushed to the right but the icon stays where it was .... so there is way too much space on the left. , at least with a 16x16 glyph.



#15041 nxButton

Posted by didiergm on 30 December 2010 - 04:58 PM in Next Collection

Hello,

Is there a way to change the distance between the glyph and the button caption. Currently, when the glyph position is set to left, the glyph tends to be very close to the caption and when enlarging the button, the glyph & the caption are centered. it would be nice to have that option