-
Posts
19790 -
Joined
-
Last visited
-
Days Won
643
Content Type
Profiles
Forums
Events
Posts posted by Sherzod
-
-
in runtime:
uses ... UniGUIApplication ...
procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();'); end;
Or
runtime or desingtime:
UniTabSheet1.TabVisible := False;
UniTabSheet2.TabVisible := False;
....
-
Solution:
Hide:
UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.hide();');
Show:
UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.show();');
http://forums.unigui.com/index.php?/topic/2939-how-to-hide-header/&do=findComment&comment=17616
or hide / show by index, example index=2
Hide:
UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();');
Show:
UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.show();');
-
-
Hi.
Try this:
UniPanel1 -> ClientEvents -> UniEvents add beforeInitfunction beforeInit(sender) { sender.layout = 'accordion'; sender.items = [{ title: 'Panel 1', html: 'Panel 1 content' }, { title: 'Panel 2', html: 'Panel 2 content' }, { title: 'Panel 3', html: 'Panel 3 content' }]; }
-
Hi codeb!
Try this:UniDBGrid1 -> ClientEvents -> ExtEvents add reconfigurefunction reconfigure(sender, store, columns, oldStore, the, eOpts) { // columns[your_column_index] columns[0].width = 110; columns[0].renderer = function (v, m, r) { var id = Ext.id();Ext.defer(function () {Ext.widget('progressbar', { renderTo: id, value: v / 100, width: 100 });}, 50);return Ext.String.format('<div id="{0}"></div>', id);}; }
Sincerely. -
Hi ganzqgy.Try this:
in designtime:
UniDateTimePicker1 - > ClientEvents - > UniEvents add beforeInit
function beforeInit(sender) { sender.setMinValue(new Date(2013,0,1)); sender.setMaxValue(new Date(2014,11,31)); }
or
in runtime:
UniSession.AddJS(UniDateTimePicker1.JSName + '.setMinValue(new Date(2012,0,1));');
http://stackoverflow.com/questions/10241626/extjs-datefield-initialising-date
Sincerely.- 1
-
Hi eelias.
If I understood correctly, try this:
UniSession.AddJS(UniScrollBox1.JSName + '.scrollBy(100, 100);');
Sincerely. -
-
Hi eelias.
Use
document.title
try
uses ... UniGUIApplication ...
UniSession.AddJS('document.title = "test";');
Sincerely.
- 1
-
Hi eelias.The width of the vertical scroll bar can be found so:
'document.getElementById("'+UniDBGrid1.JSName+'_id").parentNode.offsetWidth - document.getElementById("'+UniDBGrid1.JSName+'_id").offsetWidth;'
I think you can always reduce to this value in the calculation, regardless of the visibility of scroll...
or use grid.headerCt.forceFit = true;
UniDBGrid1 - > ExtEvents - > reconfigure
function reconfigure(sender, store, columns, oldStore, the, eOpts){ sender.headerCt.forceFit=true; }
Sorry if misunderstood the question.
Sincerely.- 1
-
Hi eelias.If I understand correctly, try this:
procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS(UniPanel1.JSName + '.animate({ duration: 1000, to: { x: 10, y: 10, opacity: 100}, listeners: {afteranimate: function() {ajaxRequest('+UniPanel1.JSName+', ''finished'', [])}}});'); end;
procedure TMainForm.UniPanel1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName = 'finished' then begin // Your custom logic ShowMessage('finished'); end; end;
Animation EventsEach animation you create has events for beforeanimation, afteranimate, and lastframe.
Keyframed animations adds an additional keyframe event which fires for each keyframe in your animation.All animations support the listeners configuration to attact functions to these events.
startAnimate: function() {
var p1 = Ext.get('myElementId');
p1.animate({
duration: 100,
to: {
opacity: 0
},
listeners: {
beforeanimate: function() {
// Execute my custom method before the animation
this.myBeforeAnimateFn();
},
afteranimate: function() {
// Execute my custom method after the animation
this.myAfterAnimateFn();
},
scope: this
});
},
myBeforeAnimateFn: function() {
// My custom logic
},
myAfterAnimateFn: function() {
// My custom logic
}Due to the fact that animations run asynchronously, you can determine if an animation is currently running on any target by using the getActiveAnimationmethod. This method will return false if there are no active animations or return the currently running Ext.fx.Anim instance.
In this example, we're going to wait for the current animation to finish, then stop any other queued animations before we fade our element's opacity to 0:
var curAnim = p1.getActiveAnimation();
if (curAnim) {
curAnim.on('afteranimate', function() {
p1.stopAnimation();
p1.animate({
to: {
opacity: 0
}
});
});
}Sincerely.- 1
-
Hello everybody...
How to implement it in UniGUI?Any ideas.Thank you. -
-
Hi uniguibbs.
I think, for the time being, it can be implemented using ExtJS (not UniGUI) ... Like this:
Sincerely -
Can you give the code where you edit record?
-
SocialCalc
implemented in Javascript.
http://www.aosabook.org/en/socialcalc.html
Demo: http://plugindetector.com/ru/socialcalc
-
Hi eelias.
Maybe not the best solution...
If you created a form withUniPanel1.Visible := False,then1. Change the Visible property to true:UniPanel1.Visible = True;2. Then, add beforeInit to UniPanel1 -> UniEventsfunction beforeInit(sender) { sender.animate({ duration: 1, to: { opacity: 0 }}); }
3. Then you can use your code.
UniSession.AddJS(UnPanelMessage.JSName + '.animate({ duration: 1000, to: { opacity: 1 });'); UniSession.AddJS(UnPanelMessage.JSName + '.animate({ duration: 1000, to: { opacity: 0 });');
Sincerely(Sorry if I misunderstood the question...) -
Hi Farshad.
Please tell me whether it is possible disable synchronization of changes in the grid:
grid.store.autoSync = false;
And then after the changes the user can save the changes.
Using:
grid.store.sync ();
Is it possible?
Thank you.
-
QUESTION: If i use the delphi intebase components .. where should i put the connection and the querys ? have i a problem with new records again ?
Hi erich.wanker.
I use standard components InterBase.connection and the queries, it's desirable put in DataModule...Sincerely -
It can be used also in UniDBGrid, to lock some cells ...
-
-
Solution:
Hide:
UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.hide();');
Show:
UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.show();');
Sincerely
-
Solution:
1. UniStringGrid -> Options -> goEditing = true
2. UniStringGrid -> ExtEvents -> add event beforeedit
function beforeedit(editor, context, eOpts) { var FixedRow, FixedCols; FixedRow = 1; FixedCols = 1; if (editor.cmp.uniRow < FixedRow || editor.cmp.uniCol < FixedCols) { return false; } }
Sincerely...
- 1
-
In designtimes, uniStringGrid's FixedRows and FixedCols are the same as normal StringGrid.
but in runtimes as webmode, all cells of the unistringgrid are the same, they can be edited with options property of "UniStringGrid -> Options -> goEditing = true", and all can not be edited with "goEditing = False".
And now, I just want to make FixedRows and FixedCols Can not be edited, no matter "goediting" be true or false.
I'm sorry for my poor description.
Sorry I just didn't understand the question, now everything is clear.Now I will try to find a solution...
Hide Tabs from UniPageControl
in General
Posted
Or
runtime or desingtime:
UniTabSheet1.TabVisible := False;
UniTabSheet2.TabVisible := False;
does not help?