Jump to content


didiergm

Member Since 13 Jun 2007
Offline Last Active Nov 16 2011 09:57 AM
-----

Topics I've Started

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

16 November 2011 - 09:58 AM

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

tnxheaderpanel

19 March 2011 - 09:09 PM

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






Problem with validating input

17 February 2011 - 07:18 PM

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

Need to have a tCell.asInt64

31 January 2011 - 02:26 PM

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


Select the parent row

24 January 2011 - 05:08 PM

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