creating nxTabSheet causes OnChange event
#1
Posted 06 November 2006 - 10:02 PM
when creating new nxTabSheet
the event nxPageControlChange is triggered
i dont think this should happen
#2
Posted 06 November 2006 - 10:14 PM
i added in the last line:
if (not(csDestroying in ComponentState)) and (not(csLoading in ComponentState)) then DoChange; { event }
and now its ok
ok i mean the event is not triggered
but i think u should look if does not conflicts with other things
i also noticed u have this as the first line in your SetActivePage event:
if csDestroying in ComponentState then Exit;
and the last line was
if not(csDestroying in ComponentState) then DoChange; { event }
1 of the above should be ommited, no?
#3
Posted 06 November 2006 - 10:39 PM
what exactly adaptivecolor , means?
if a tab does not fit into the current view, whole of it disappears until the user clicks the scroller
is it possible to show part of that tab, and clicking on the scroller makes all tabs go left/right by x pixels?
#4
Posted 07 November 2006 - 03:37 PM
I think that OnChange should occur when you add a Page. I don't think that this is not normal.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 07 November 2006 - 03:50 PM
OnChange should occur only when a new page is selected
new page added, does not mean it gets focus (actually it doesnt)
it causes problem that my OnChange code is executed
just when my application starts so it throws exception bcoz some of the objects were not defined yet
#6
Posted 07 November 2006 - 05:19 PM
just when my application starts so it throws exception bcoz some of the objects were not defined yet
Seems like you assume existence of something. You could add some extra checks like
begin
//mycode
end;
This kind of problem can also happen when you re-order the usage clauses of the dpr file for instance.
#7
Posted 07 November 2006 - 09:00 PM
but i didnt handle them bcoz i didnt think this event will be triggered
just bcoz i have 1 (in this case) nxtabsheet from design time
the original pagecontrol does not trigger this event when adding new pages
(surely not when these pages are from design time)
i think u should follow this with your component
#8
Posted 07 November 2006 - 09:34 PM
I will think about this situation a little bit more, then I will made a decision.
I will test Delphi PageControl too.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 08 November 2006 - 01:36 AM
ofcourse the last decision is yours
im here just to give u another point of view
#10
Posted 08 November 2006 - 01:42 AM
In most cases I am following standard Delphi controls, but sometime it is maybe better to have own implmentation.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#11
Posted 08 November 2006 - 09:41 AM
about the scroller issue i told u about in another post
u said u r following VS2005 standards
and here u say sometimes it is better to have your own implementation
about the scroller issue i would agree to have your own implementation
and here i think u should follow the standard
just my 2cents
#12
Posted 10 November 2006 - 12:09 AM
but please remove the event OnChange when creating new page in a TnxPageControl
thanks
ps: did u check regular PageControl?
#13
Posted 16 November 2006 - 12:16 AM
I have fix it, but now newly created page will not become automatically active. Example:
var
Page: TNxTabSheet;
begin
Page := TNxTabSheet.Create(NxPageControl1);
Page.Caption := 'Laza';
NxPageControl1.AddPage(Page);
NxPageControl1.ActivePage := Page; // <-- need to be added manually
end;
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#14
Posted 16 November 2006 - 09:14 AM
only if i want to make the newly added page active
its not always the case
#15
Posted 16 November 2006 - 03:11 PM
Yes, only if you need it.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











