Background picture on the page

kvb
Member Posts: 107
Hello, everybody!
Is there any way to create the page with background picture?
Thanks!
Is there any way to create the page with background picture?
Thanks!
0
Best Answers
-
You can add an image. But i'm not sure about adding background image. That's not possible in NAV i guess.Harikiran BM | ERP Specialist5
-
Please correct me If I'm wrong, I think it is not possible, good to share if someone have any extra information or comment on that.Software Developer,
Archerpoint India Pvt. Ltd,Chennai.5 -
No I too dont think its possible in NAV. Though it's possible in RDLC Report.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
You can change controls properties on page by add-in included to page.
6 -
It is dot net library created myself, i name it NavControl
If you have some experience in creating add-in controls you can make this steps:
1. Create simple control (Panel for example). It can be no visible and need only to get events and form controls on page. Current Form you can get beyond you control like this :myPanel.FindForm()
2. Get all controls of form (Page) to List<Control> variables. For example i make function like thispublic void GetControlCollection(Control _control, ref List<Control> _controlcollection) { foreach (Control ctrl in _control.Controls) { _controlcollection.Add(ctrl); if (ctrl.Name != "") GetControlCollection(ctrl, ref _controlcollection); } }
do not forget add this assembly to projectusing Microsoft.Dynamics.Framework.UI.WinForms.Controls;
3. Create function which find control by ID and set necessary properties. You can do it in Set Value sections if your control inherited from StringControlAddInBase. In Name property of control stored transformated information about Page ID and Control ID.
For transform c\side control ID to Name i use this function where name parameter - it is your control's name (myPanel.Name).public static string Control2Name(string name, int id) { byte[] array = TryGuid(name).ToByteArray(); array[6] = Convert.ToByte(id & 255); array[7] = Convert.ToByte(id >> 8 & 255); id >>= 16; if (id > 0) id++; array[4] = Convert.ToByte(id & 255); array[5] = Convert.ToByte(id >> 8 & 255); Guid guid = new Guid(array); return "{" + guid.ToString().ToUpper() + "}"; }
4. So, when you find applicable control in your collection (from point 2.) you can GetType of control and set property that you need.((TextView)_control).TextBox.ForeColor = Color.Red;
5. Remember - if control no visible when page open there are no control on formand you can't set property. You must hande ControlAdded event parent of control.
Also you can't to set control's property in OnOpenPage trigger(because there no Form yet), you must create neccesary event.
There are some subtleties in behavior of RTC client. For example when you change settings page controls or page they can be recreated without your changes. To decide this task you need to store your changed controls properties and handle events (Create, Dispose) to store or reestablish property.
Personally, I use this opportunity to store data if page reloaded.private void Page_Disposed(object sender, EventArgs e) { AppDomain CurAppDomain = AppDomain.CurrentDomain; CurAppDomain.SetData(((Form)sender).Name, ElementBuffer); //Where ElementBuffer properties of customized page controls }
So, good luck!
PS
I said almost everything.
5
Answers
-
You can add an image. But i'm not sure about adding background image. That's not possible in NAV i guess.Harikiran BM | ERP Specialist5
-
Please correct me If I'm wrong, I think it is not possible, good to share if someone have any extra information or comment on that.Software Developer,
Archerpoint India Pvt. Ltd,Chennai.5 -
No I too dont think its possible in NAV. Though it's possible in RDLC Report.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
Thanks guys! Time to use java or.NET I suppose..0
-
You can change controls properties on page by add-in included to page.
6 -
Hi Danil, this is exactly what i need, could you be more specific how to do it?
What is the add-in?1 -
It is dot net library created myself, i name it NavControl
If you have some experience in creating add-in controls you can make this steps:
1. Create simple control (Panel for example). It can be no visible and need only to get events and form controls on page. Current Form you can get beyond you control like this :myPanel.FindForm()
2. Get all controls of form (Page) to List<Control> variables. For example i make function like thispublic void GetControlCollection(Control _control, ref List<Control> _controlcollection) { foreach (Control ctrl in _control.Controls) { _controlcollection.Add(ctrl); if (ctrl.Name != "") GetControlCollection(ctrl, ref _controlcollection); } }
do not forget add this assembly to projectusing Microsoft.Dynamics.Framework.UI.WinForms.Controls;
3. Create function which find control by ID and set necessary properties. You can do it in Set Value sections if your control inherited from StringControlAddInBase. In Name property of control stored transformated information about Page ID and Control ID.
For transform c\side control ID to Name i use this function where name parameter - it is your control's name (myPanel.Name).public static string Control2Name(string name, int id) { byte[] array = TryGuid(name).ToByteArray(); array[6] = Convert.ToByte(id & 255); array[7] = Convert.ToByte(id >> 8 & 255); id >>= 16; if (id > 0) id++; array[4] = Convert.ToByte(id & 255); array[5] = Convert.ToByte(id >> 8 & 255); Guid guid = new Guid(array); return "{" + guid.ToString().ToUpper() + "}"; }
4. So, when you find applicable control in your collection (from point 2.) you can GetType of control and set property that you need.((TextView)_control).TextBox.ForeColor = Color.Red;
5. Remember - if control no visible when page open there are no control on formand you can't set property. You must hande ControlAdded event parent of control.
Also you can't to set control's property in OnOpenPage trigger(because there no Form yet), you must create neccesary event.
There are some subtleties in behavior of RTC client. For example when you change settings page controls or page they can be recreated without your changes. To decide this task you need to store your changed controls properties and handle events (Create, Dispose) to store or reestablish property.
Personally, I use this opportunity to store data if page reloaded.private void Page_Disposed(object sender, EventArgs e) { AppDomain CurAppDomain = AppDomain.CurrentDomain; CurAppDomain.SetData(((Form)sender).Name, ElementBuffer); //Where ElementBuffer properties of customized page controls }
So, good luck!
PS
I said almost everything.
5 -
O man, you rock!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions