OnChange event for TnxPageControl
#1
Posted 18 November 2006 - 01:56 PM
some issues about nxPageControl:
1) when the main form is created i have several pagecontrol components
on one of them i have a TnxTabSheet - from designtime
the OnChange event of the TnxPageControl is triggered in the above case
even b4 the FormCreate event is triggered
it wasnt like that in the previous version
2) Scrollers are still enabled even when they are not needed (tabs are not overflowed)
the current situation is very confusing, the user clicks on them but nothing happens
3) ScrollMethod: was commented out, why? how can i tell the pagecontrol that each click will show fully the next invisible tab?
4) i have a pagecontrol inside a pagecontrol. in the inside pagecontrol i have a listview which parent tab is set according to a variable
if i call the inside pagecontrolChange event manually (after settings the .activepageindex) the listview is not shown though the parent and visible properties are ok. if i click on another tab in the inside pagecontrol (pagecontrolChange event is triggered automatically), then the listview is shown ok
edited: it seems that if the new ActivePageIndex is the same as now (no change) OnChange event is triggered but the content of that page is not refreshed so the content is not visible (though the visible property is true)
thanks
#2
Posted 18 November 2006 - 03:36 PM
1) Open NxPageControl.pas and find:
procedure TNxNotebook.SetActivePage(const Value: TNxTabSheet);
replace last line into:
2) This will be changed soon.
3) Work is still in progress for this property.
4) Can you please give me some small sample to I test it. Thank you.
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.
#3
Posted 18 November 2006 - 03:50 PM
2) in the next release? is there a quickfix for this until then?
3) is there a quick fix for this, until it will be part of the release?
4) TNxNotebook.SetActivePage line 2: if (Value = FActivePage) then Exit
if i omit this line it works, bcoz then all the refresh and inside processing is executed. otherwise, even if OnChange event is triggered manually, it doesnt affect the content if it was set inside the OnChange event (at runtime)
5) tabfont - works perfect - thanks
#4
Posted 18 November 2006 - 04:01 PM
2) I will add a quick fix. Anyway, I have a plan to release new files every few days.
3) I don't know right now
4) Can you please attach here one small sample app to I test. I don't know it is a good to comment line.
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 18 November 2006 - 04:03 PM
i want to release a new version of my application that's why i ask
if its not possible then its ok
3) ok, i hope it will be fixed soon
4) i will make a sample and put it here in a few minutes
#6
Posted 18 November 2006 - 04:23 PM
attached sample
if line 2 as i mentioned b4 exists
clicking on the button - wont do anything
if line 2 is commented out, the listview changes place inside the nxtabsheet (page 0) as it should
anyway, if u manually click on one of the tabs (onchange event is triggered)
the listview changes place inside the selected tab
if the above is not clear, let me know
(edited: for some reason i cant add attachment: sample.rar
so here it is here: http://download.yous...181EF9C0592BABC
#7
Posted 19 November 2006 - 09:40 PM
was it helpful?
is a new release with the issues that were left out in 3.9.5
will be release soon?
#8
Posted 19 November 2006 - 10:45 PM
This bugs will be fixed, one by one
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 20 November 2006 - 01:03 AM
if i click on an already selected tab
the events (changing/change) are triggered again
a refresh is done as well
this should be think about more carefully then
#10
Posted 22 November 2006 - 12:32 AM
please advice a quick fix (if there is ofcourse)
for the problem of choosing the same tab causing to refresh itself
that happen when i commented TNxNotebook.SetActivePage line 2: if (Value = FActivePage) then Exit that caused another problem
thanks
#11
Posted 22 November 2006 - 05:28 AM
Problem is because current ActivePageIndex is already 0 (set in design-time) and, when you manualy set ActivePageIndex from code nothing is changed and OnChange event don't occur.
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.
#12
Posted 22 November 2006 - 09:06 AM
but this problem didnt occur in version 3.9.4
sth was changed for version 3.9.5 that causes this
#13
Posted 22 November 2006 - 03:59 PM
This is because you have ask me to remowe OnChange event when adding new pages
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 22 November 2006 - 04:55 PM
so how TPageControl behaves?
u dont have this problem
and the OnChange event is not triggered when u add a new page
#15
Posted 22 November 2006 - 05:29 PM
Now, when you add new page OnChange don't occur. You need to manualy add listview into page.
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.
#16
Posted 22 November 2006 - 10:36 PM
the thing is:
i have a listview in pagecontrol X
if i chose a certain tab in X
there is a pagecontrol Y (that is placed in that certain tab)
and the listview should now placed there (so i have to do it in runtime)
since the activepageindex of Y is 0 from designtime
when placing the listview there, the tab is not refreshed/invalidate or redrawn (whatever should be) so the listview is not visible on that tab
only manually clicking on another tab and back, making this listview visible (visible property is true from the begining)
after doing listview.parent := tab (in pagecontrol Y)
i did pagecontrol.refresh, and pagecontrol.refreshpage
i even tried tab.pagevisible := false and then tab.pagevisible := true
but nothing helped
plz advice
thanks
#17
Posted 23 November 2006 - 12:53 AM
the solution is just set the activepageindex to sth else
and then back
that is just in case the new index is like the current activepageindex
the solution is a bit skew but it works
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











