Point
uniGUI Subscriber-
Posts
192 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by Point
-
Does uniGUI have Error Code for every Exception or Does UniGUI have Constanta Message unit file like DBConst.pas so we could customize Exception Message procedure TUniServerModule.UniGUIServerModuleException( Sender: TUniGUIMainModule; AException: Exception; var Handled: Boolean); begin if AException.ErrorCode = 10001 then AException.Message = 'bla bla bla...'; end;
-
Hi Sherzod, seem it didn't mistake in creating the url link, it is proven by using a right click, the link leads to the intended url. After I reset the url link by deleting and recreate the url link, it worked fine. i don't know what caused it. Many thanks for support.
-
Yes, I tried to click several url link in unidbhtmlmemo, work nice
-
Hi @Sherzod, I modified the code above, so when i click the url link can open a new browser tab. after i implemented this code only works occasionally. function initialize(sender, eOpts) { sender.iframeEl.dom.contentDocument.body.addEventListener('click', function(e) { if (e.target.href !== undefined) { e.preventDefault(); window.open(e.target.href, "_blank"); }; }); } something wrong with my code?
-
custom toolbar_x264.mp4
-
Base this link: https://docs.sencha.com/extjs/7.4.0/classic/src/HtmlEditor.js-1.html hope usefull for other. @Sherzod, please correct this code if wrong. uniDBHTMLMemo -> extEvent -> uniEvent -> beforeInit : function beforeInit(sender, config) { this.changeFont = function(fontName) { this.win.focus(); this.relayCmd('fontName', fontName); this.deferFocus(); }; this.setColor = function(color) { this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#' + color : color); this.deferFocus(); }; this.setBGColor = function(color) { if (Ext.isGecko) { this.execCmd('useCSS', false); this.execCmd('hilitecolor', color); this.execCmd('useCSS', true); this.deferFocus(); } else { this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#' + color : color); this.deferFocus(); } }; this.adjustFont = function(adjust) { var size = this.getDoc().queryCommandValue('FontSize') || '2', isPxSize = Ext.isString(size) && size.indexOf('px') !== -1, isSafari; size = parseInt(size, 10); if (isPxSize) { if (size <= 10) { size = 1 + adjust; } else if (size <= 13) { size = 2 + adjust; } else if (size <= 16) { size = 3 + adjust; } else if (size <= 18) { size = 4 + adjust; } else if (size <= 24) { size = 5 + adjust; } else { size = 6 + adjust; } size = Ext.Number.constrain(size, 1, 6); } else { isSafari = Ext.isSafari; if (isSafari) { adjust *= 2; } size = Math.max(1, size + adjust) + (isSafari ? 'px' : 0); } this.relayCmd('FontSize', size); }; this.createLink = function() { var url = prompt(this.createLinkText, this.defaultLinkValue); if (url && url !== 'http:/' + '/') { this.relayCmd('createlink', url); } }; this.toggleSourceEdit = function(sourceEditMode) { var me = this, iframe = me.iframeEl, textarea = me.textareaEl, hiddenCls = Ext.baseCSSPrefix + 'hidden', btn = me.getToolbar().getComponent('sourceedit'); if (!Ext.isBoolean(sourceEditMode)) { sourceEditMode = !me.sourceEditMode; } me.sourceEditMode = sourceEditMode; if (btn.pressed !== sourceEditMode) { btn.toggle(sourceEditMode); } if (sourceEditMode) { me.disableItems(true); me.syncValue(); iframe.addCls(hiddenCls); textarea.removeCls(hiddenCls); textarea.dom.removeAttribute('tabIndex'); textarea.focus(); me.inputEl = textarea; } else { if (me.initialized) { me.disableItems(me.readOnly); } me.pushValue(); iframe.removeCls(hiddenCls); textarea.addCls(hiddenCls); textarea.dom.setAttribute('tabIndex', -1); me.deferFocus(); me.inputEl = iframe; } me.fireEvent('editmodechange', me, sourceEditMode); me.updateLayout(); }; } ToolBar Button Click : procedure TMainForm.MemoToolBarClick(Sender: TObject); begin with edtCodeContent, JSInterface do begin case TUniButton(Sender).Tag of 0 : JSCall('execCmd', ['bold']); 1 : JSCall('execCmd', ['italic']); 2 : JSCall('execCmd', ['underline']); 3 : JSCall('adjustFont', [1]); 4 : JSCall('adjustFont', [-1]); 5 : JSCall('execCmd', ['justifyleft']); 6 : JSCall('execCmd', ['justifycenter']); 7 : JSCall('execCmd', ['justifyright']); 8 : JSCall('createLink', []); 9 : JSCall('execCmd', ['insertorderedlist']); 10 : JSCall('execCmd', ['insertunorderedlist']); 11 : JSCall('toggleSourceEdit', [spdSourceMode.Down]); end; end; end; Fore color, Background color and Change Font : procedure TMainForm.btcBgColorSelect(Sender: TObject; Color: TColor); var Aclr : string; begin Aclr := ReplaceText(uniColor2Web(Color),'#',''); with edtCodeContent, JSInterface do begin JSCall('setBGColor', [Aclr]); end; end; procedure TMainForm.btcFontColorSelect(Sender: TObject; Color: TColor); var Aclr : string; begin Aclr := ReplaceText(uniColor2Web(Color),'#',''); with edtCodeContent, JSInterface do begin JSCall('setColor', [Aclr]); end; end; procedure TMainForm.cbFontNameSelect(Sender: TObject); begin with edtCodeContent, JSInterface do begin JSCall('changeFont', [LowerCase(cbFontName.Text)]); end; end;
-
Hi Sherzod, Previously I had an idea to create a panel containing tools instead of toolbar on unidbHtmlMemo (show toolbar = false), but I don't know what functions for each tool in extjs. and i dont how to execute that function. For example, in Delphi I usually make something like this: case TButton(sender).tag of //change font to bold 0 : ChangeFontBold; //-> call procedure to bold memo text; //change font to italic 1 : ChangeFontItalic; //-> call procedure to italicmemo text //change font to underline 2 : ChangeFontUnderline; //-> call procedure to underlinememo text; . . . //and so on end; best regard.
-
For example I will insert a sentence on the end paragraph. I will change the style of this text. I have to scroll up first because the toolbar is covered. if the toolbar is sticky or floating. I don't need to scroll up. like the record navigator's panel that I made beside this uniDBHTMLmemo. see this video : floating toolbar_x264.mp4
-
almost ten years I joined this forum, but no progress in mastering javascript/extjs. I decided to make this application, trying to record all topics. I didn't think, why wasn't it done earlier
-
doesn't matter, with horizontally or vertically
-
hi sherzod, like this : floating_edit_x264.mp4
-
is it possible to make the toolbar in uniDBHTMLMemo to be floated
-
Just install 1554, Hint still not showing. Is hint's property of TuniMenuItems not applicable for TuniTreeMenu ?
-
Below is the incremental changelog for uniGUI - v1.90.0.1554: 1.90.0 (Equinox) +---------------------------------------------------------------------------------------- . . Bug [UNG-3277] - Emerald theme is missing. [UNG-3278] - Method enable() of undefined property. looks like it was fixed in release 1554
-
fyi, i've set hint properties on TUniMenuItems as source menu for TuniMenuMenu but hint not showing.
-
sorry sherzod, my english makes you confused, i hope you understand what i mean. for example i have 3 menu item on unitreemenu like this: menu 1 menu 2 menu 3 sub menu 31 sub menu 32 sub menu 33 i want show tooltip in menu 2 or sub menu 32. 1. how to display tooltip with extjs code/ext Event 2. if using CSS like in that thread, what kind selector should be modified
-
on one menu item only for example : menu 1 menu 2 -> show hint here menu 3
-
If you don't mind, I'd like to know how to work around the two methods above. so i can learn extjs too.
-
Hi, Base on this thread : http://forums.unigui.com/index.php?/topic/9773-hint-exttiptooltip/ i try to add hint/tooltip on one of treemenu item but still not working: function afterrender(sender, eOpts) { sender.tip = Ext.create('Ext.tip.ToolTip', { target: sender.el, //delegate: sender.getElementById(MainForm.UniMenuItems1.Test1.id); html: '<span class="hintClass">MyHint</span>' }); and i try this code in one of menu item : UniMenuItems1.Test1.Caption := '<div id="anim"><span class="tooltip" data-tooltip="username must' + ' consist of 29 symbols.">Test 1</span></div>'; this hint always display inside menu item. how to resolve this. thanks you in advanced.
-
whereas the design will be efficient if one aux control can be used for multiple unidbgrids. hopefully in the future this feature can do it. thx.
-
hi, A control for Pagingbarauxcontrol on unidbgrid not align properly when use for multi unidbgrid. best regard. testcase.7z
-
Hi irigsoft, thanks for reply. i meant change gray color to another color when unispeedbutton has selected or clicked uspdbtn.mp4
-
Yes, and i modified your code that i get in another thread. but still not work. please check for my test case project. i wanna change gray color after unispeedbutton click/selected.
-
-
._x-item-disabled .x-treelist{ opacity: 1; -moz-opacity: 1; filter: alpha(opacity=100); color: black; background-color: red; } why disabled's color opacity (gray color) keep remain ?