473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

GUI definition in external file

Hi,

A little part of my (.NET 2.0) WinForm GUI need to be configurable by
a user. The user can specify a variable number of items which should
appear on a form like this:
<Label<Label<ComboBox>
<Label<Label<ComboBox>
<Label<Label<TextBox>
<Label<Label<CheckBox>
etc
I want to store the (user changeable) definition for this in an
external XML file. My 1st thought was reading the XML file and filling
a DataGridView, but you can't seem to mix Edit/Text/Checkboxes in a
single grid because you set the type by column. Ow well, I think I can
generate the GUI dynamically placing the controls in a panel with
AutoScroll set to True.

But the user needs to be able to add a little dynamic behavior too.
For example, if combobox1 has value "SomeValue1" and CheckBox2 is
checked, TextBox1 should be disabled.

Any thoughts on how I can achieve this?

Thanks,
Onno
Apr 3 '08 #1
3 1882
On Apr 3, 9:15*am, onno.will...@gmail.com wrote:
Hi,

A little part of my (.NET 2.0) WinForm GUI need to be configurable by
a user. The user can specify a variable number of items which should
appear on a form like this:
<Label<Label<ComboBox>
<Label<Label<ComboBox>
<Label<Label<TextBox>
<Label<Label<CheckBox>
etc
I want to store the (user changeable) definition for this in an
external XML file. My 1st thought was reading the XML file and filling
a DataGridView, but you can't seem to mix Edit/Text/Checkboxes in a
single grid because you set the type by column. Ow well, I think I can
generate the GUI dynamically placing the controls in a panel with
AutoScroll set to True.

But the user needs to be able to add a little dynamic behavior too.
For example, if combobox1 has value "SomeValue1" and CheckBox2 is
checked, TextBox1 should be disabled.

Any thoughts on how I can achieve this?

Thanks,
Onno
Hmmm... maybe using xaml and wpf? I haven't played a lot with the
loading of external xaml, but it should be doable. I think you may
even be able to do some of the stuff your trying to do using xaml
databinding and triggers....

--
Tom Shelton
Apr 5 '08 #2
Hmmm... *maybe using xaml and wpf? *I haven't played a lot with the
loading of external xaml, but it should be doable. *I think you may
even be able to do some of the stuff your trying to do using xaml
databinding and triggers....
Thanks! But wpf is not part of .NET 2.0 (or can it be done?) And can
you mix wpf with a WinForm app (have one part of a form be filled in
by WPF?)

Regards,
Onno
Apr 6 '08 #3
On Apr 6, 4:16*am, Onno <onno.will...@gmail.comwrote:
Hmmm... *maybe using xaml and wpf? *I haven't played a lot with the
loading of external xaml, but it should be doable. *I think you may
even be able to do some of the stuff your trying to do using xaml
databinding and triggers....

Thanks! But wpf is not part of .NET 2.0 (or can it be done?) And can
you mix wpf with a WinForm app (have one part of a form be filled in
by WPF?)

Regards,
Onno
It's part of 3.0 - which is the 2.0 runtime with extra libraries.
And, there is an addin for vs2005 for wpf. And yes, you can mix and
match winforms and wpf (even on the same form).

VS2005 Addin:
http://www.microsoft.com/downloads/d...displaylang=en

--
Tom Shelton
Apr 6 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: DanielBradley | last post by:
Hello all, I have recently been porting code from Linux to cygwin and came across a problem with static const class members (discussed below). I am seeking to determine whether I am programming...
7
by: A_StClaire_ | last post by:
hi, I'm working on a project spanning five .cpp files. each file was used to define a class. the first has my Main and an #include for each of the other files. problem is my third file...
19
by: J. J. Farrell | last post by:
After many years of dealing with definition and linkage issues in ways that I know to be safe, I've decided it's time to try to understand this area properly. Consider a header file with the file...
10
by: PCHOME | last post by:
Hi! Would someone please help me thess C error(in gcc on Linux)? The compiler continues to give me: readLP.o: In function `Input_Problem': readLP.o(.text+0x0): multiple definition of...
14
by: Carramba | last post by:
hi! I have program with several funktion witch are in separete files, I have one include file were I have definet some variables and initiated 'const double fVar=0.874532;' this files is includet...
9
by: joshc | last post by:
Hi, I have an array defined in one file with an intializer as follows: int arr = {0, 1, 2, 3}; I have a declaration of the array in another file as follows: extern int arr;
11
by: Old Wolf | last post by:
Does the following program require a diagnostic? Which section of the Standard deals with this? (I read the section on function calls and didn't see anything). void f(void); int main(void) {...
15
by: mdh | last post by:
May I ask. If an array is defined , not as a static, but outside of a function, is there any guarantee as to the contents of each element? Thanks.
7
by: sh.vipin | last post by:
/* Sample code*/ #include <stdio.h> int a; //line # 3 int a; //line # 4 int main (int argc, char *argv){ printf("a is %d",a); }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.