yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] wesch00:
Is it that what you want?

public partial class TestForm : Form
{
private SenseHeaderControl senseHeaderControl;
private SenseListControl senseListControl;
private SenseTextboxControl senseTextboxControl;

public TestForm()
{
InitializeComponent();

senseHeaderControl = new SenseHeaderControl
{
Text = "Test",
Dock = DockStyle.Top,
};

senseListControl = new SenseListControl
{
Dock = DockStyle.Fill,
};

senseTextboxControl = new SenseTextboxControl
{
Text = "Text",
Dock = DockStyle.Bottom,
Multiline = true,
Height = 200,
ForeColor = Color.Red,
BackColor = Color.LightGray,
};

senseListControl.AddItem(new SensePanelDividerItem("Demo", "Demo"));

Controls.Add(senseListControl);
Controls.Add(senseTextboxControl);
Controls.Add(senseHeaderControl);
}
}

Docking is only possible for the controls itself, not for the panel items.

Unfortunatly the ForeColor and BackColor of the inner TextboxControl seem not be exposed to the SenseControl, so it does not work. But should be simple to fix.
[Windows Mobile Software Development] leen15:
thanks but is what i yet did..

my problem is that upper the textbox i've a combobox and if i dock the textbox at bottom and i open the list from combo, it moves the textbox down instead of go over it.. :(
[Windows Mobile Software Development] wesch00:
Hey, this is, how every windows control behaves. If you drop down a combo, the items also overlap other controls. And since the combo box itself is a secondary sense list control somehow. I would say it doesn't matter that the underlaying textbox is hidden while selecting combo items.

Sorry, have no solution for that prob.
[Windows Mobile Software Development] leen15:
maybe, is possible have the scroll always from the last item and not from the first? if is possibile and can insert item between other items, i resolve my problem.. i'm try to create something like the "new message" from manila, if can be useful for help me..
[Windows Mobile Software Development] KUV1977:
Can someone of the more experienced users tell me how i set the scroll position of the list - mainly to top, but maybe also to a defined element?
[Windows Mobile Software Development] wesch00:
Inserting of items is crrently not supported, may be in a later version, don't know. But I ran also into a such a problem where I needed to insert items. The way I did it, clear the whole list and readd all the items again. Unfortunatly the lists starts with the scroll position allways at the top.
[Windows Mobile Software Development] JacE25:
I think i've found a bug with the SenseMessageBox

If i make something like

SenseAPIs.SenseMessageBox.Show("long \nlong \nlong \nlong \nlong\nlong \n\rlong \nlong \n\nlong Text","Testing",SenseMessageBoxButtons.OK);

It Looks like

If i take 2-3 more lines, the button isn't visible any more, allthough there is a lot of unused space in the SenseMessageBox. My Mistake?
[Windows Mobile Software Development] meltwater:
@eboelzner

Sorry to ask, but any chance you have an example panel available to show how to create the "about" style panel, as mentioned previously.

I'm not sure on how to create something like that without something to work from first and I'm hoping to work on that bit in the next day or two. Keen to have something nice for posting facebook status updates from (hopefully a multi-line message box or transparent page with a text box in)...would be good to get that section of code finished.

Also, can I over-ride the Yes/No text in the dialogue boxes (ideally by setting my own text (using my own lang translations)) or can it only be done using the localization route?

If anyone else can give me an example instead that would be great too, since obviously we don't really want to divert eboelzner from his excellent work :D
[Windows Mobile Software Development] greenhacks:
In one of the screenshot, there is a ajax style loading status icon, those circles when something is loading.

Does anyone know how to show them?

Any code sample or its name?
[Windows Mobile Software Development] leen15:
I think that is the loading of right-click menu! ;)
[Windows Mobile Software Development] greenhacks:
thanks for your reply, i wish it was a control.

i am doing some heavy processing and thought to show that busy loading icon.

hopefully sometime in future it will be part of it.

thanks.
[Windows Mobile Software Development] computerjunkie:
Looking at the code, what you want to do is very easy.

Create a new class (AboutPanel, for example) that inherits the ITranslucentForm Interface.

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using StedySoft.SenseSDK;
using StedySoft.SenseSDK.DrawingCE;

namespace SenseControlTesting
{
class AboutPanel : ITranslucentForm
{

}
}

Then, in your form add the code necessary to use your about panel.

// Create a new instance of your class
AboutPanel a = new AboutPanel();

// Create a control
Label lbl = new Label();
lbl.Text = "I am a normal Windows Form Control";
lbl.Height = lbl.Height + 10;
lbl.BackColor = Color.Red;

// Create another control
SenseLabelControl slc = new SenseLabelControl();
slc.Text = "I am SenseLabelControl";
slc.BackColor = Color.Blue;

// Add the controls to your About Panel
a.Controls.Add(lbl);
a.Controls.Add(slc);

// Show your About Panel
a.Show();

The easiest thing to do to get the look that eboelzner got, in my opinion, is to create an image in your favorite image editor and then load that image instead of loading a bunch of controls. That may be performance efficient, too.

That should give you a start on how to go about doing that. Let me know if you need more help.
[Windows Mobile Software Development] mike3000c:
How can v1.38 handle over hundred number case?

even I set the Maximum = 500, the SensePanelNumericItem still show 99.

Could anyone have idea? thanks.
[Windows Mobile Software Development] greenhacks:
Worked like a charm. Thanks for showing how to use it. Gives a final touch to application by addding that fancy about form ;)
[Windows Mobile Software Development] computerjunkie:
You could always tell the list control to bring the LAST item into view. That would solve your problem of scrolling going to the top control.

(SenseListControl.ScrollIntoView(SenseListItem))
[Windows Mobile Software Development] leen15:
yes it's what i did... :)

now my problem is only insert item between other.. i'll think something :P
[Windows Mobile Software Development] computerjunkie:
Try this. It MIGHT be what you're looking for. This will keep a regular textbox at the bottom and keep the sense list control at the top.

Rough Code:

//Normal Windows Panel, not Sense Panel
Panel editingPanel = new Panel();

//SenseListControl
SenseListControl mainList = new SenseListControl();
mainList.Dock = DockStyle.Fill;

//Normal Windows Textbox, NOT Sense Textbox
TextBox textBox = new TextBox();
textBox.MultiLine = True;
textBox.Dock = DockStyle.Bottom;

//add both to the regular windows panel
editingPanel.Controls.Add(textBox);
editingPanel.Controls.Add(mainList);

//add regular panel to your main form
this.Controls.Add(editingPanel);
[Windows Mobile Software Development] meltwater:
Thank you very much for pointing me in the right direction, I shall give it a try.
[Windows Mobile Software Development] greenhacks:
Does anyone know any way to reload all the controls in SenseListControl?

I have added MoreItem control in SenseListControl, when i click Back menu, i want all controls in SenseListControl to be reloaded like they are running for first time.

.Refresh just redraws the screen i guess, so not useful.

.Update also did not work.

Before i execute senseListCtrl.ShowParent(), i want to reload all parent controls.

thanks.
[Windows Mobile Software Development] computerjunkie:
Are you trying to increase performance? Because I think they are already loaded into memory so you can't just reload them. I THINK that MoreItemPanel is a new panel and it doesn't get destroyed.
[Windows Mobile Software Development] greenhacks:
Well actually i load dynamically lots of control. and then when i go to moreitems, i process something where it is supposed to remove few controls from main parent. now i dont want to simply remove all of them, and reload all controls to maintain the order. so i thought if there is easy way to just reload the listcontrol, and it will automatically remove controls by reading the array again.

i think i will find some better way to handle this.
[Windows Mobile Software Development] computerjunkie:
if the array that you speak of holds the controls then I guess you could simply write a method that adds the controls from the array. If you want to make sure those controls already don't exist, you could use the IsExist() method. I'm still not sure what you're trying to do so forgive the response if it isn't what you were looking for. :)
[Windows Mobile Software Development] greenhacks:
On form load i do this:

- create senselistcontrol

- for loop to add sensepanelmoreitem 10 times (reads items from file)

- add some more control

- add some more controls

Now in runtime i select sensepanelmoreitem childitems, and delete few entries from file.

So now when i go back to parent form, there were some controls (sensepanelmoreitem) should be removed. but when i go back, they are still there because i didnt remove them.

To remove them all i think is to remove all controls from the listcontrol, and re-add them so that i can get the same order of my controls.

i am trying to find a way where i can simply re-run that for loop and cleanup controls which are not required in that section only.

hope this helps to understand.
[Windows Mobile Software Development] computerjunkie:
Hm...

After you add the controls, save their index (SenseMoreItemPanel.Index). Then you could use the SenseListControl.Remove(int Index) method to remove the specific items.
[Windows Mobile Software Development] greenhacks:
Your understanding is correct.

I can add the control again from array, but problem is that the controls which were added below them will go on top, and the controls from array will start adding from bottom which will mess up my control orders/flow.

Only i could think was to first remove all controls, and then add the arrays controls first which i want, and then add the remaining controls below them to preserve the flow i want.
[Windows Mobile Software Development] greenhacks:
This sounds something worth trying.

I will also try if SenseListControl.Remove allows to remove by control name.

If i could add somesort of panel inside senselistcontrol, then would be great.

it would act as container which i can clear and reload with controls i want, and will not affect other controls.

Thanks for your assistance.
[Windows Mobile Software Development] greenhacks:
Looks like my problems just doesnt stop.

You suggested a way to remove controls, but now i just thought that how would i insert more when required between them.

I still think a container kind of control would have solved my issues.

That would hold all this controls inside it, and i could remove, add, insert them anytime.
[Windows Mobile Software Development] computerjunkie:
The RemoveItem() method allows you to remove by name. Also, it should be fairly easy to create a new panel and add controls to it.

for example:

SensePanelItem p = new SensePanelItem();
p.Children.Add(other items that implement ISenseListItem);
[Windows Mobile Software Development] greenhacks:
I dint knew SensePanelItem can hold more controls, i always used it to display some text like a label control.

i will give it a try. thanks a lot for helping me this quick.
[Windows Mobile Software Development] computerjunkie:
You're welcome. You can use a SenseLabelControl as a label too :-P
[Windows Mobile Software Development] greenhacks:
I work entirely in SenseListControl, and there is no SensePanelLabelControl like other controls with SensePanel Prefix.

Not sure if i can still add SenseLabelControl inside SenseListControl.

will try it out.
[Windows Mobile Software Development] greenhacks:
I tried to add labelcontrol

i got error as: InvalidCastException

Dim lbl = New StedySoft.SenseSDK.SenseLabelControl

lbl.Name = "lbl"

lbl.Text = "Label"

senseListCtrl.AddItem(lbl)
[Windows Mobile Software Development] computerjunkie:
Yea it looks like SenseLabelControl doesn't implement the ISenseListItem interface. What you will have to do is create a custom panel that implements ISenseListItem and then use it.
[Windows Mobile Software Development] greenhacks:
I cant add controls in SensePanelItem, gives me NullReferenceException

I did like this:

Dim spi = New SensePanelItem("spi")

Dim itm1 = New SensePanelMoreItem("itm1")

Dim itm2 = New SensePanelMoreItem("itm2")

spi.Children.Add(itm1)

spi.Children.Add(itm2)

senseListCtrl.AddItem(spi)

the line where i add (spi.Children.Add(itm1)), it gives nullrefereceexception.
[Windows Mobile Software Development] greenhacks:
Do you have any example on how to create custom panel that implements ISenseListItem? sorry for trouble. even a basic c# example is ok, i will figure out the rest.

Thanks for helping.

Just FYI, i am building a nice dynamic utility, which i plan to give back to XDA with code in vb.net. quite near to finish it.
[Windows Mobile Software Development] computerjunkie:
That looks like a bug. As far as the code seems, that should work.
[Windows Mobile Software Development] wesch00:
@greenhacks

I wrote it allready, you cannot "insert" items, only remove is available. In my app I do something similar. In the sense list control I have one MoreItem which determines the filter of the item in the list. So after returning from the more item I have to remove and add different items. The more item is the first one, so with I remove all items but the first one which is the more item.

while (senseListControl.Count > 1)
{
senseListControl.Remove(1);
}

If you would also remove the more item, you run in to trouble, because that item is currently returning from the more page. So this should not be removed.

After removing all items, simple add the needed ones again. That does the trick.
[Windows Mobile Software Development] leen15:
Hi, One question:

the function

StedySoft.SenseSDK.DrawingCE.Resolution.ScreenHeight

Is the Height of the screen, inclusive of the top and bottom windows bar, but how can i have the height without bars? :confused:
[Windows Mobile Software Development] divinglog:
When I create a list with 260 items and scroll quick I get after some time this exception:

When I use an image after scrolling through the list some images will be displayed wrong after a while. I think these 2 problems may have the same reason. I'm using .NET CF 3.5.
[Windows Mobile Software Development] Sl4sher:
When I try to do an application.exit I get an objectdisposedexception. I don't know if I'm doing something wrong or if it's sensesdk. I don't have any threads running that would cause this...

" at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)\r\n at System.Windows.Forms.Control.Dispose(Boolean disposing)\r\n at System.ComponentModel.Component.Dispose()\r\n at StedySoft.SenseSDK.SenseComboControl.Finalize()\r\n"

Any ideas?
[Windows Mobile Software Development] leen15:
i think you have to Dispose every control of Sense sdk you used.

If you use only SenselistControl you can do only :

SenselistControl.Dispose();

Before the dialog that you used that object closing.

if you don't have SenselistControl but have single controls ( i see SenseComboControl in your example) you have to Dispose every single control.

I hope this help. ;)
[Windows Mobile Software Development] Ublinx:
Hi

I've been trying to implement this translucent about form but having issues with it. Done as per above, but I get a very small square size form and can't change the size. If I create the class, inheriting the ITranslucenForm, and create an instance of my class without any controls, then I get the translucent panel over my whole screen. As soon as I add a control to it, everything messes up. Also the class I created, always gets warning cause it's not CLS-compliant... Is that the cause of the problems? Any ideas?

Sorry but am a noob at .net/mobile programming.

Cheers

JM
[Windows Mobile Software Development] meltwater:
Yep I get something very similar, however using sense controls I get better results.

EDIT: I take that back, it worked with sense button and sense text box, but label doesn't so far.

Unfortunately it's not suitable for using with SIP and a text box (it leaves any traces behind on the transparent part, fair enough really but thought it'd be nice if it worked).

Still for static text it will be perfect, I assume if I extend the form it will scroll like the about panel too.

Unfortunately I'm still quite new to graphics handling, using an image with transparency would be fine for my about box but haven't had much success with the transparency part.

Basically I'm after something like the Sense SDK about panel, with my own logo, my own text, a web link (to open default browser) and an embedded button to bring up the Sense SDK about panel too.
[Windows Mobile Software Development] ebernazz2:
not being CLS compliant is not a problem and is only a warning which can be turned off with a [CLSCompliant(false)] public int SetValue(UInt32 value); procedure declaration.

My thoughts on your code:

First Make sure you set the aboutform's dock property to "fill".

Second only use the SenseLabelControl and also set its dock property (to fill for the whole screen or top etc.)

Try that and let me know if you get closer.

Eric
[Windows Mobile Software Development] greenhacks:
In vb.net i used to get CLS-compliant warning on a parameter of the function (sender as object), that was because i did not mention whether i want the funciton as private.

if that helps.

Update:

Sorry just noticed, even my about form generates the same error.

Warning	1	'frm_about' is not CLS-compliant because it derives from 'ITranslucentForm', which is not CLS-compliant.
[Windows Mobile Software Development] jpreinoso:
Problem with Toolbox VS2005 and .NETCF 3.5

I cant see the toolbox components, I try delete and reset toolbox from command line too and can't see the component, help please!!!
[Windows Mobile Software Development] ebernazz2:
This has been discussed quite a bit so please read through the posts. I also provided some code to use the SDK without using the toolbox which for now you have to do.

Eric
[Windows Mobile Software Development] Ublinx:
Hi Eric

Thanks for sharing your thoughts... Indeed the CLS-compliance doesn't seem to be a real problem... I've tried as you suggested but still no luck. When you set the SenseLabelControl dock property to fill, the whole translucent form disappears... well more like the senselabelcontrol covers the whole form with a totally transparent background... so we don't get that black translucent background. Same happens when you dock it to top, the top part of the forms gets totally transparent and hence the text content of the sensecontrollabel gets mixed up with the form that's beneath... Sorry can't be clearer... I'll try to get a screen capture, which will surely be better than my explanation.

JM
[Windows Mobile Software Development] ebernazz2:
Thats looks right. I would have expected that result.

If what you are looking for is the blackened transparent form to then have text or images then I believe you would do the following.

Declare the about form inheriting as you did.

Set dockstyle to fill

use no controls on the form.

Simply then draw your text using Graphics.Drawstring and set up the font family, size, style, brush, x & Y. If you have not done that before let me know and I will write some code (I am not a coder as I sit behind a desk [much better money much less satisfaction] in my older age and my coding was done on old mainframes but I try to keep up).

Eric
[Windows Mobile Software Development] Ublinx:
Well you're totally right, never done this before :D am just starting with vb.net coding and still learning, mainly by trying. Just like you am not a coder but likes to have fun with it... So any help would be most welcome... Thanks again.

JM
[Windows Mobile Software Development] Ublinx:
Hey Eric... I gave it a try and managed to do it... Thanks for pointing me in the right direction... that's exactly what I wanted to achieve.

Got another question though? can i add a picture/image using the same procedure, but I guess I would need another method for that and not drawstring :confused:

Thanks again
[Windows Mobile Software Development] ebernazz2:
e.graphics.drawimage

Eric
[Windows Mobile Software Development] greenhacks:
I know it cant be done, but if anyone was able to change the text for On/Off from SensePanelOnOffItem control.

I wanted it to say Yes/No, but not sure if it can be done.

Hope Edward can inlcude in next release.

Does anyone know if it can be done by localization or something, if anyone has any such example, would appreciate if shared.

thanks.
[Windows Mobile Software Development] meltwater:
Yep I wanted this, but not too important for my app, note they do change automatically according to your regional settings localization setting. You can also force a localization too I think from the code.

The rest of my text is driven from the xxxxxxxx_manila language files using a custom api, so I was planning on keeping it consistent, but localization is fine for that.
[Windows Mobile Software Development] divinglog:
Hi

Does the Sense list control support many items, e.g. up to 1000 SensePanelItems? Does it use some kind of virtualization? I've tried 260 items and after scrolling for a while (the performance is good) I get memory exceptions and the icons are drawing wrong. Does anyone have a working list with so many items?

For these kind of long lists it would be great to have an index on the right side, like in the original Sense contacts app. But I would need a numerical index, e.g. for every 100th item in the list. Would that be possible?

Thank you for this awesome SDK! Keep up the great work!

Sven
[Windows Mobile Software Development] computerjunkie:
There really shouldn't be a need for that many lists. Have you considered paging?
[Windows Mobile Software Development] divinglog:
It's for an dive logbook application and all dives in one list would be the best way. I'm just not sure if the list control from this SDK is suitable for this approach. I've just did some tests with the manila list and it works without problems with 1000 items, but I like this list more from the look and feel. The scroll performance is no problem with so many items, but I'm not sure about the memory and the icon drawing issue. And of course I need some kind of index jumping, but I can create that myself if it's not possible to include it on the right side like in the contacts app.
[Windows Mobile Software Development] Skadork:
Take a look at: http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.current.aspx

That should point you in the right direction. It sets the cursor to the "wait" cursor.
[Windows Mobile Software Development] Skadork:
Ed: 1.38 is fabulous! You're work is amazing. Thank you again for continuing development on this project!
[Windows Mobile Software Development] greenhacks:
Perfect, this would work. i will give it a shot.

Thanks for assisting.
[Windows Mobile Software Development] flyeag:
Hello, Anybody know how to show Bitmap button. I saw the sdk, but I didn't find it. Or Anybody has the help document of this sdk?
[Windows Mobile Software Development] leen15:
Somebody can help me? :)

EDIT:

I found the solution, this work for me:

int BarHeight = SystemInformation.MenuHeight;
int SenseSize = (StedySoft.SenseSDK.DrawingCE.Resolution.ScreenHeight - BarHeight);